Atlaslog
Atlaslog / Field Notes / Services & tile access
Field note · Services & tile access

GetCapabilities takes a minute and clients time out

Quick answer

GetCapabilities returns in 40 to 60 seconds with an 18 MB document, while a single GetMap takes 200 ms. With 1200 or more layers each publishing a full SRS list, metadata assembly is the bottleneck rather than rendering.

Last verified 2026-11-03 · Multiple versions · Cite this page
Applies to: GeoServer 2.25 · Nginx 1.24
Symptom
Checklist
  1. Time the request with curl time_total to separate server time from network time.
  2. Read size_download; anything above 5 MB means the document needs trimming.
  3. Check the layer count and whether every layer publishes every SRS.
  4. Check whether capabilities caching is enabled, since otherwise metadata is rebuilt on each request.
  5. Check JVM heap and GC pauses in the server log.
Fix

Publish only EPSG:4326 and EPSG:3857 per layer, enable capabilities caching, and put Nginx proxy_cache in front with proxy_cache_valid 200 10m and proxy_cache_lock on. Clients should load /geoserver/rest/layers.json for the layer tree instead of the full capabilities document.

Code
504 Gateway Time-out
nginx/1.24.0
curl -o /tmp/cap.xml -w "状态 %{http_code} 大小 %{size_download} 耗时 %{time_total}s\n" \
  "http://127.0.0.1:8080/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities"
Watch out
All 120 field notesChinese originalRunnable examples
English edition written for Atlaslog from the original Chinese field note. Code is unchanged and runs as-is.
Cite this page

Atlaslog (2026). GetCapabilities takes a minute and clients time out. https://www.jingweizhi.com/en/cookbook/wms-getcapabilities-timeout.html (accessed 2026-11-03).