Postgresql and osm2pgsql

Hi,

I made my own map server on my local PC and it’s working so far. But i have a huge problem which I cant fix.
First I imported a very small map area here around Stuttgart with osm2pgsql. Worked well and the maps is rendered fine.
Then I wanted to put more data into the database so I started osm2pgsql again with the data from Baden-Wütremberg. But now on some zoomlevels I have the whole area and on some others I joust have the map from Stuttgart and on some there is I a empty gap between the area of Stuttgart and the rest of Baden-Würtemberg.
I tried may options from osm2pgsql with but nothing helped to solve this. I also fail to empty the whole database and start again from zero.

Please how can I fix this?

I’m guessing that what you’re seeing are cached tiles, either in the browser or on the server. Where there’s a “gap” it’s likely that it just hasn’t had chance to create new tiles there yet.

If you’ve got a “normal” Ubuntu install you should be able to do

 sudo tail -f /var/log/syslog | grep "TILE " 

When a request for a new tile comes in you’ll see

START TILE

and when that tile is complete you should see

DONE TILE

Then if you refresh the problem tile in your browser you should see the new one.

Hm, seems i youst get an error if i request new tiles:


May  7 15:04:20 markus-ThinkPad-T540p renderd[1703]: DEBUG: START TILE default 13 4280-4287 2848-2855, new metatile
May  7 15:04:20 markus-ThinkPad-T540p renderd[1703]: ERROR: failed to render TILE default 13 4280-4287 2848-2855
May  7 15:04:20 markus-ThinkPad-T540p renderd[1703]: DEBUG: DONE TILE default 13 4280-4287 2848-2855 in 0.169 seconds
May  7 15:04:20 markus-ThinkPad-T540p renderd[1703]: DEBUG: START TILE default 13 4280-4287 2856-2863, new metatile
May  7 15:04:20 markus-ThinkPad-T540p renderd[1703]: ERROR: failed to render TILE default 13 4280-4287 2856-2863
May  7 15:04:20 markus-ThinkPad-T540p renderd[1703]: DEBUG: DONE TILE default 13 4280-4287 2856-2863 in 0.165 seconds
May  7 15:04:21 markus-ThinkPad-T540p renderd[1703]: DEBUG: START TILE default 13 4280-4287 2856-2863, new metatile
May  7 15:04:21 markus-ThinkPad-T540p renderd[1703]: ERROR: failed to render TILE default 13 4280-4287 2856-2863
May  7 15:04:21 markus-ThinkPad-T540p renderd[1703]: DEBUG: DONE TILE default 13 4280-4287 2856-2863 in 0.168 seconds
May  7 15:04:30 markus-ThinkPad-T540p renderd[1703]: DEBUG: START TILE default 13 4280-4287 2848-2855, new metatile
May  7 15:04:30 markus-ThinkPad-T540p renderd[1703]: DEBUG: START TILE default 13 4280-4287 2856-2863, new metatile
May  7 15:04:30 markus-ThinkPad-T540p renderd[1703]: ERROR: failed to render TILE default 13 4280-4287 2848-2855
May  7 15:04:30 markus-ThinkPad-T540p renderd[1703]: DEBUG: DONE TILE default 13 4280-4287 2848-2855 in 0.225 seconds
May  7 15:04:30 markus-ThinkPad-T540p renderd[1703]: ERROR: failed to render TILE default 13 4280-4287 2856-2863
May  7 15:04:30 markus-ThinkPad-T540p renderd[1703]: DEBUG: DONE TILE default 13 4280-4287 2856-2863 in 0.199 seconds

What could be the problem?

That “failed to render” is pretty much instantaneous (it’s not even “thinking about rendering”), so try looking at what gets written to the log without the “grep”. What we do know is that your web server is receiving the request for a tile, and it’s passing that to renderd, but that renderd can’t render it for some reason. Without knowing exactly what you’ve tried between it working for Stuttgart and not working for the whole of BaWu it’s difficult to say.

When you look at the full log, you might see “Failed to read cmd” messages - don’t worry about those. Also, restarting the rendering daemon with

sudo /etc/init.d/renderd restart

will generate lots of potentially helpful log messages.