[Tile-serving] [openstreetmap/mod_tile] Changes to fix memory leaks in renderd and mod_tile when using Postgres (PR #497)

Steve Karmeinsky notifications at github.com
Thu Apr 9 16:36:47 UTC 2026


I had a look and also used Claude to help so included the Claude.md file. OSM UK tried running on Ubuntu with Postgres and the virtual server ran out of memory and I isolated this in renderd ... it works (but is very slow) with single threaded sqlite
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/mod_tile/pull/497

-- Commit Summary --

  * Add CLAUDE.md with build instructions and architecture overview
  * Fix memory leaks and unchecked malloc return values
  * Cache parameterized Mapnik maps per render thread to fix PostGIS memory leak
  * Fix unchecked malloc returns, NULL dereferences, and resource leaks
  * Update CLAUDE.md with newly found and fixed issues
  * Fix threading bugs: recv pointer arithmetic, signal handler safety, dead macro

-- File Changes --

    A CLAUDE.md (156)
    M includes/render_config.h (1)
    M src/gen_tile.cpp (53)
    M src/renderd.c (61)
    M src/request_queue.c (9)
    M src/store_file.c (22)
    M src/store_memcached.c (5)
    M src/store_rados.c (12)
    M src/store_ro_composite.c (39)
    M src/store_ro_http_proxy.c (4)

-- Patch Links --

https://github.com/openstreetmap/mod_tile/pull/497.patchhttps://github.com/openstreetmap/mod_tile/pull/497.diff
-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/mod_tile/pull/497
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/mod_tile/pull/497 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20260409/a7822742/attachment.htm>


More information about the Tile-serving mailing list