Experimental: Using PostgreSQL Query Cache

Rendering PDF, PNG and SVG output makes Mapnik execute the same set of queries three times in a row. This has two effects:

  • rendering takes longer as queries are re-executed
  • output of the different formats may differ as data may have changed in between

By using the PostgreSQL Query Cache with a cache time of 10 minutes rendering the additional formats takes less time as query results can be reused, this also guarantees that all three formats are rendered using the same data.

On the other hand re-issuing a render request within less than ten minutes will not show changed data. This shouldn’t be much of an issue though as right now OSM changes are only processed every 15 minutes anyway.

Database maintenance

I’m going to do an OSM database reimport this weekend (Feb 25-26).

The web frontend will be online most of the time, so existing maps can still be retrieved, and new rendering jobs can be created, but the rendering daemon will be offline for at least all of Saturday, probably most of Sunday, too.

So don’t expect any new jobs entered over the weekend to be rendered before Monday, Feb. 27th, and the database may still be a bit behind for a few more days until things have fully caught up with minutely diffs again.

Continue reading “Database maintenance”

Rendering Deamon problems resolved (mostly)

Being mentioned in Wochennotiz / weeklyOSM 339 lead to quite some additional traffic (which is good), but unfortunately also revealed an issue that could only surface with enough parallelism. This lead to random rendering failures, and eventually to a total stop of the rendering daemon on Tuesday and parts of Wednesday.

This has hopefully been resolved now, the rendering daemon has finished all pending jobs in the queue, and I manually restarted those jobs that were listed as “canceled by user”, knowing that at least some of these had actually been killed by the system instead.

Continue reading “Rendering Deamon problems resolved (mostly)”

MapOSMatic instance currently down :(

Update: the problem was in dead code in my own extensions to the OCityMaps renderer which used Nominatim via geopy.geocoders at some point in the past. This code was no longer used / needed and so has been removed now.

Original post:

The MapOSMatic instance currently returns “500 internal server error” only, the root cause of this is some OpenSSL error deep inside Django/Nominatim integration as far as I can tell so far.

This started after installing “Lets encrypt” and enabling SSL on another domain hosted on the same server, even though the MapOSMatic site doesn’t even use https yet.

So I’m not sure yet whether this is due to Apache configuration changes, or due to additional Pyhton packages that got installed during the process …