This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

Getting 504 Gateway Timeout with “Valid document was not found in the cache and only-if-cached directive was specified” for some tiles

1

Requesting, e.g., https://a.tile.openstreetmap.org/17/67225/43067.png shows showed:

The following error was encountered while trying to retrieve the URL: http://b.tile.openstreetmap.org/17/67224/43067.png

Valid document was not found in the cache and only-if-cached directive was specified.

You have issued a request with a only-if-cached cache control directive. The document was not found in the cache, or it required revalidation prohibited by the only-if-cached directive.

I really don't think the browser is sending that header. Running the following from a different location (just be sure it's not some network issue at work) yields did yield the very same error:

curl 'https://b.tile.openstreetmap.org/17/67224/43067.png' -H 'Referer: http://127.0.0.1:4200/demo/embed-mjgp2.html' -H 'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36' --compressed --verbose

...showing no header like that:

> GET /17/67224/43067.png HTTP/2
> Host: b.tile.openstreetmap.org
> Accept: */*
> Accept-Encoding: deflate, gzip
> Referer: http://127.0.0.1:4200/demo/embed-mjgp2.html
> User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36
...
< HTTP/2 504
< server: nginx
< date: Mon, 11 Jun 2018 08:21:34 GMT
< content-type: text/html
< content-length: 1445
< x-squid-error: ERR_ONLY_IF_CACHED_MISS 0
< x-cache: MISS from konqi.openstreetmap.org
< x-cache-lookup: MISS from konqi.openstreetmap.org:3128
< x-cache: MISS from trogdor.openstreetmap.org
< x-cache-lookup: MISS from trogdor.openstreetmap.org:3128
< via: 1.0 konqi.openstreetmap.org:3128 (squid/2.7.STABLE9), 1.1 trogdor.openstreetmap.org (squid/3.5.12)
< strict-transport-security: max-age=31536000; includeSubDomains

So I guess some internal proxy on the OSM server is adding that header?

asked 11 Jun '18, 10:42

avbentem's gravatar image

avbentem
31114
accept rate: 0%

edited 11 Jun '18, 20:20


One Answer:

3

There have been some issues with the squid proxy in recent days. The sysadmins are working on it.

answered 11 Jun '18, 18:01

Richard's gravatar image

Richard ♦
30.9k44279412
accept rate: 18%