-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random crashes when rasterizing tiles #1411
Comments
Does this seem similar to #1236 . Possibly try 4.5.1 and see if the issue happens in that version just so we can get an idea of when this started. In docker are you able to see how much memory is allocated and in use? My understanding is y default all memory is available, but maybe that isn't the case? I run 5.0.0 without the docker here on Ubuntu 22.04 and haven't noticed any issues, but some people have reported similar issues when using the docker. |
@acalcutt thank you very much for helping!!! |
Do you think you could try this minimal test I had made for the maplibre-narive v6 rendering issue on macOS It is basically a crude test application that uses maplibre-native to render the same image 50 times. If it works, maybe try increasing the amount of renders by increasing https://github.com/acalcutt/maplibre-node-test/blob/macos_test/app.js#L53 to something bigger (say 1000) and see if it finishes creating all the images |
Ok... after some digging we found the cause for our problem. Maybe it helps others as well. Our map contains vector data, but also raster data. We produced this raster data using the good super old Tilemill and it wrote into the metadata table of the resulting mbtiles Now when a user was requesting a tile, but that could not be found (it was the one directly where our data starts but it seems it needs the surrounding tiles as well - for font rendering i suppose... is it tileMargin in the config?!?), inside So my proposal would be (I have no idea about node-js) but to make sure that throwing exceptions in there are properly caught?!? And maybe e.g. an empty-content response or something is returned?!? Not sure. Also: What was a problem for us was KNOWING THAT! We did start our docker-container (but also same applies without docker and running it from source) with the So yes, that was our problem. We solved it by updating our mbtiles to And then if I may ask... is there a way to speed up the starting time? Then debugging now that was a bisi a problem, cause starting the tileserver takes around 4-5 min for us with those large mbtiles. Is it going through the contents of those files I suppose while startup? Is there a way to prevent that? |
Thank you for doing the extra troubleshooting and figuring this out a bit. a PR to fix or improve any issues you found with logging would be a great addition and appreciated. my guess is some of that logging could have been broken when mbtiles got promisified recently. For the unknow file type issue, I wonder if we could set a list of expected extensions, and if it isn't in the list we set a default value. maybe in the createEmptyResponse function at ( https://github.com/maptiler/tileserver-gl/blob/master/src/serve_rendered.js#L85 ). Looking at this function, my guess is it might fail at .toFormat(format) if the value wasn't something sharp supports. |
For the start speed issue, do you have a lot of mbtiles? My instance only takes about 30 seconds to start. On startup it connects to each mbtiles file and pulls out metadata needed to serve tilejson. it pulls all that info into a big internal array. |
Or check that on startup... i guess it opens and parses the metadata table of mbtiles anyway. Not just crash at execution then. So it would constantly fail on startup already. And yes... the toFormat fails because of sharp, yes! |
We have about 10 mbtiles files, some are super large (500-600GB) and some are smaller. But shouldn't the query just for the metadata be super fast? At least when I do it manually it's instant?!? So I guess it makes something else with those files as well?!? If you want to debug, I can screenshare and we can have a look, but I can't give you the mbtiles, sorry :-) |
I have around 30 mbtiles at https://tiles.wifidb.net and don't see those long startimes. For the most part, TileServer gl just connects to the database using @mapbox/mbtiles and pulls out the metadata. However if it is taking a long time and your file is large, I wonder if your mbtiles file is missing some metadata like
In my files I usually edit them and add in any missing bounds/minzoom/maxzoom/center , so maybe that is why I don't see this. |
Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net>
Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net>
We are using tileserver-gl to serve our maps. We have apps that only use vector tiles and that is NO PROBLEM at all. We separated all incoming requests already and noticed that serving pure vector data does not cause any problems. But for our website we still use raster tiles and that seems to cause problems after a couple of hours. We get consistent crashes and we think (not know) that it has something todo with memory consumption?!? At least memory seems to spike before crashes happen. The machines would have plenty though (50GB) but it's already crashing way before that.
Currently we use version 4.11.1 and also tried the latest 5.0.0 to test and still the same problem. It's running on linux machines in a docker-container. (
maptiler/tileserver-gl:v4.11.1
)We can also not give more information about what causes the issue, cause we don't know it and the logs of our docker-container don't say much.
So my first question would be: how to provide information to narrow down the problem?
The text was updated successfully, but these errors were encountered: