maptiler / tileserver-gl

Vector and raster maps with GL styles. Server side rendering by MapLibre GL Native. Map tile server for MapLibre GL JS, Android, iOS, Leaflet, OpenLayers, GIS via WMTS, etc.
https://tileserver.readthedocs.io/en/latest/
Other
2.23k stars 638 forks source link

Memory leak kubernetes (docker) maptiler/tileserver-gl #585

Open vkarabchuk opened 2 years ago

vkarabchuk commented 2 years ago

Hi all I have a problem with memory leak issue when running maptiler/tileserver-gl in kubernetes I see that the node process used full the RAM until it hits the limit as a result the node reboot I have 3 replicas on nodes with 4 cpu and 8 ram in hetzner (ubuntu 20.04) I am using 3.1.1 tilesserver version from the changes, I added crons to the container and also installed lsof and reread the mbtile file that changes every 30 minutes using the kill -HUP $(lsof -t -i:80) command and i add osm-bright styles 6 GB of RAM using all in 6 hours kubernetes v1.19.1 kubernetes with docker containerization Could you help to solve the issue?

alexriabtsev commented 2 years ago

@petrsloup maybe you could help?

boldtrn commented 2 years ago

Does this issue still exist with v4.0.0?

basduineveld commented 1 year ago

We are running v4.4.2 and are seeing the same issue. With every HUP signal, the memory usage increases by about 200 MB, until the pod goes OOM. When we disable the cronjob that sends the HUP signal, the memory usage remains stable at 800 MB for days.

acalcutt commented 1 year ago

If anyone has a solution I welcome a PR. for me I don't use docker here, i just run tileserver-gl directly in node, but it doesn't seems to have the same memory issues when run that way (at least I have never experienced memory issues with tileserver run directly)