Page MenuHomePhabricator

Error "Maximum zoom is 18"
Closed, ResolvedPublic

Description

Spotted in logstash. An error line 502 of /srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/kartotherian-core/lib/core.js

kartotherian: Maximum zoom is 18 
    at Object.validateZoom (/srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/kartotherian-core/lib/core.js:502:15)
    at /srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/kartotherian-server/lib/tiles.js:37:25
    at tryCatcher (/srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/bluebird/js/release/util.js:16:23)
    at Function.Promise.attempt.Promise.try (/srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/bluebird/js/release/method.js:39:29)
    at requestHandler (/srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/kartotherian-server/lib/tiles.js:30:23)
    at Layer.handle [as handle_request] (/srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/express/lib/router/layer.js:95:5)
    at next (/srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (/srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/express/lib/router/layer.js:95:5)
    at /srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/express/lib/router/index.js:277:22
    at param (/srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/express/lib/router/index.js:349:14)
    at param (/srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/express/lib/router/index.js:365:14)
    at param (/srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/express/lib/router/index.js:365:14)
    at param (/srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/express/lib/router/index.js:365:14)
    at param (/srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/express/lib/router/index.js:365:14)
    at param (/srv/deployment/kartotherian/deploy-cache/revs/82c738b6434707725beb71ce1f9031c410a83d92/node_modules/express/lib/router/index.js:365:14)

Event Timeline

hashar created this task.Sep 27 2016, 7:08 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 27 2016, 7:08 PM
Restricted Application added a project: Discovery. · View Herald TranscriptSep 27 2016, 9:04 PM
hashar triaged this task as Normal priority.Oct 6 2016, 3:10 PM
Yurik added a subscriber: Yurik.Oct 6 2016, 3:46 PM

I wonder if we need to simply hide this warning? Someone is requesting tiles in zoom > 18, which we don't support. Kartographer wouldn't do that because it has the same limits. This could either be wmflabs users or 3rd party downloading tiles directly.

debt added subscribers: Gehel, debt.Oct 12 2016, 5:17 PM

After chatting with @Gehel this morning—it looks like we return a HTTP 400 error message to the user that is requesting a tile with a zoom level that is greater than 18. Since the error message is adding to the bloat of the logs, I'm sure it'd be ok to hide it.

I'm also pretty sure that since other OSM mapping services offer zoom levels to 22, users are just assuming that Kartotherian does as well. Further evidence of this is in this ticket: T147622 (asking to add zoom level 19).

Yurik added a comment.Oct 12 2016, 5:23 PM

At some point we probably should increase the zoom, for both internal & external use, but first we should establish a usage policy T141815. As for errors - agree, I will need to rework error reporting in kartotherian, possibly reducing this error's severity. On the other hand, we should be at least reporting it to the graphs, so that if something goes bad, we will see that the error count went through the roof.

Yurik claimed this task.Oct 12 2016, 6:35 PM
Yurik moved this task from Backlog to To-do on the Maps-Sprint board.

Maybe that error can be converted to debug/info and also list the request zoom level. This way you would have some data about which zoom levels are most requested?

mpopov added a subscriber: mpopov.Oct 12 2016, 10:49 PM

There are a few IP addresses that make 1000+ requests/day for 19-22 zoom level tiles via MapboxGL 1.0, specifically. Some have made upwards of 43K requests for those zoom levels in one day. Can't share the specific IP addresses here in the ticket but this the Hive query to get them:

SELECT
  date, client_ip, user_agent, country, COUNT(1) AS requests
FROM (
  SELECT
    TO_DATE(ts) AS date,
    client_ip, user_agent,
    geocoded_data['country'] AS country
  FROM wmf.webrequest
  WHERE
    webrequest_source = 'maps'
    -- AND year = 2016 AND month = 9 AND day = 27
    AND ((month = 9 AND day > 24) OR (month = 10 AND day < 7))
    AND uri_path RLIKE '^/([^/]+)/([0-9]{1,2})/(-?[0-9]+)/(-?[0-9]+)(@([0-9]\\.?[0-9]?)x)?\\.([a-z]+)$'
    AND uri_query <> '?loadtesting'
    AND CAST(REGEXP_EXTRACT(uri_path, '^/([^/]+)/([0-9]{1,2})/(-?[0-9]+)/(-?[0-9]+)(@([0-9]\\.?[0-9]?)x)?\\.([a-z]+)$', 2) AS INT) > 18
    AND http_status = '400'
) AS refined_webrequests
GROUP BY date, client_ip, user_agent, country
HAVING requests > 1000
ORDER BY
  date ASC,
  requests DESC
LIMIT 1000;

Other user agents with 5000+ requests include: "contagt mapservices(iPhone/10.0.2)" and "osmdroid"

Yurik added a comment.Oct 13 2016, 7:34 PM

I reduced the severity of this "error" to "info". The current kartotherian configuration (puppet) logs everything including "info" level. I think it should be ok to raise it to "warn". I don't want to reduce this to "trace" level because anyone debugging the app should see these kinds of events in the log.

The message is gone from logstash since 2016-10-13 17:18:32 UTC. So at least from the point of log management I am all set :]

Yurik closed this task as Resolved.Oct 14 2016, 6:42 PM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:11 PM