You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
The tilestrata serve hangs when incorrect (out of range) coordinates are requested. Say, the request is: http://192.168.0.1:8080/vtile/8/17927/10954/t.pbf. The values for x and y are way too high and as a result server outputs:
/home/osmdebian/node/osm-server/node_modules/tilestrata-vtile/backend.js:119
map.render(new mapnik.VectorTile(z, x, y), options, function(err, image) {
^
TypeError: required parameter x is out of range of possible values based on z value
at TypeError (native)
at /home/osmdebian/node/osm-server/node_modules/tilestrata-vtile/backend.js:119:14
at /home/osmdebian/node/osm-server/node_modules/tilestrata-vtile/node_modules/mapnik-pool/node_modules/generic-pool/lib/generic-pool.js:291:11
at loaded (/home/osmdebian/node/osm-server/node_modules/tilestrata-vtile/node_modules/mapnik-pool/index.js:27:28)
Sometimes it exits with error and sometimes hangs so severely it can't be killed with SIGTERM, only SIGKILL does the job.
Interestingly, the problem doesn't show up when requesting raster tiles. In that case I end up with message "http://192.168.0.1:8080/rtile/8/17927/10954/t.png image cannot be shown because it contains errors" (I believe it is correct translation).
In my app I resolved this problem with a request hook:
This does the job but I really think that end-user shouldn't have the possibility to crash the server in such a way and such protection should be included in the Tilestrata itself. I don't know if it should go to tilestrata or tilestrata-vtile though.
The text was updated successfully, but these errors were encountered:
Thanks for the detailed report @forsetius! I think this should be implemented at the tilestrata level. I'll try to get this patched up in the next few days and will let you know. I can't really speak to mapnik throwing / hanging... it shouldn't behave like that. Ideally it'd just return an error to the callback.
Hello,
The tilestrata serve hangs when incorrect (out of range) coordinates are requested. Say, the request is:
http://192.168.0.1:8080/vtile/8/17927/10954/t.pbf
. The values for x and y are way too high and as a result server outputs:Sometimes it exits with error and sometimes hangs so severely it can't be killed with SIGTERM, only SIGKILL does the job.
Interestingly, the problem doesn't show up when requesting raster tiles. In that case I end up with message "http://192.168.0.1:8080/rtile/8/17927/10954/t.png image cannot be shown because it contains errors" (I believe it is correct translation).
In my app I resolved this problem with a request hook:
For validation I use Validator.
This does the job but I really think that end-user shouldn't have the possibility to crash the server in such a way and such protection should be included in the Tilestrata itself. I don't know if it should go to tilestrata or tilestrata-vtile though.
The text was updated successfully, but these errors were encountered: