Serving OSM tiles - mod_tile/renderd/postgresql problem: I sometimes get 404 Not Found Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Configuring & debugging a new mapnik / tirex installationOpenLayers: Error message 404 (Not Found)Problem with loading OSM planet into PostgreSQLArchitecture for serving OSM-Mapnik TilesPlanet or regions offline maps between two zoom levelsServing local OSM tiles (PNG) using geoserver“getting Unknown projection string error” serving EPSG:4326 tiles with open street maps mapnik renderdWhat is an appropriate tileLayer source for tiles served on an apache localhost through leaflet?OpenLayers 2 error 404 tile not foundProblem serving tiles with tilestrata

do i need a schengen visa for a direct flight to amsterdam?

Is the address of a local variable a constexpr?

iPhone Wallpaper?

What does the "x" in "x86" represent?

What does '1 unit of lemon juice' mean in a grandma's drink recipe?

What do you call a plan that's an alternative plan in case your initial plan fails?

How to motivate offshore teams and trust them to deliver?

Antler Helmet: Can it work?

What's the difference between `auto x = vector<int>()` and `vector<int> x`?

Using et al. for a last / senior author rather than for a first author

How to find all the available tools in macOS terminal?

How can I make names more distinctive without making them longer?

What would be the ideal power source for a cybernetic eye?

What's the purpose of writing one's academic bio in 3rd person?

How do I mention the quality of my school without bragging

Why is black pepper both grey and black?

Can inflation occur in a positive-sum game currency system such as the Stack Exchange reputation system?

Right-skewed distribution with mean equals to mode?

Why is there no army of Iron-Mans in the MCU?

How can I fade player when goes inside or outside of the area?

Should I call the interviewer directly, if HR aren't responding?

How to bypass password on Windows XP account?

What causes the vertical darker bands in my photo?

Is there a "higher Segal conjecture"?



Serving OSM tiles - mod_tile/renderd/postgresql problem: I sometimes get 404 Not Found



Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Configuring & debugging a new mapnik / tirex installationOpenLayers: Error message 404 (Not Found)Problem with loading OSM planet into PostgreSQLArchitecture for serving OSM-Mapnik TilesPlanet or regions offline maps between two zoom levelsServing local OSM tiles (PNG) using geoserver“getting Unknown projection string error” serving EPSG:4326 tiles with open street maps mapnik renderdWhat is an appropriate tileLayer source for tiles served on an apache localhost through leaflet?OpenLayers 2 error 404 tile not foundProblem serving tiles with tilestrata



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















When I request tiles I get sometimes 404 Not Found. Usually, if I request the same tile again it appears alright (with 200 OK).



This is what I found in renderd logs:



renderd[734]: An error occurred while loading the map layer 'default': Postgis Plugin: ERROR: could not open file "base/16386/240582": Interrupted system call
in executeQuery Full sql was: 'SELECT * FROM ( SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type
FROM planet_osm_polygon
WHERE way_area > 100000
ORDER BY way_area DESC
) AS data LIMIT 0'


This is my 000-default.conf:



<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

LoadTileConfigFile /usr/local/etc/renderd.conf
ModTileRenderdSocketName /var/run/renderd/renderd.sock
# Timeout before giving up for a tile to be rendered
ModTileRequestTimeout 0
# Timeout before giving up for a tile to be rendered that is otherwise missing
ModTileMissingRequestTimeout 600

ModTileCacheDurationMax 31536000
ModTileCacheDurationMinimum 31536000
ModTileMaxLoadMissing 999999999
ModTileEnableTileThrottling Off
ModTileBulkMode Off
TimeOut 600

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog $APACHE_LOG_DIR/error.log
CustomLog $APACHE_LOG_DIR/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
Alias /log/ "/var/log/"
<Directory "/var/log/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from all
Require all granted
</Directory>
</VirtualHost>


My postgresql.conf:
https://pastebin.com/veYxsui5



I'm running the setup in Docker container on c5.xlarge instance on AWS.



How to eliminate 404s?










share|improve this question
























  • Same problem here, on a much more powerful system. The tiles do actually render and can be fetched a few seconds later, but the initial response is a 404. It's driving me crazy! Have you managed to fix this?

    – kontextify
    Apr 11 at 22:18











  • @kontextify I managed to minimize the problem. Unfortunately, I don't know what was the cause of this behavior. I tried many things. I stopped using Docker, I did something to permissions, I created more indexes in my PostgreSQL, I used pgtune to tune the Postgres...

    – Defozo
    Apr 12 at 11:43

















1















When I request tiles I get sometimes 404 Not Found. Usually, if I request the same tile again it appears alright (with 200 OK).



This is what I found in renderd logs:



renderd[734]: An error occurred while loading the map layer 'default': Postgis Plugin: ERROR: could not open file "base/16386/240582": Interrupted system call
in executeQuery Full sql was: 'SELECT * FROM ( SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type
FROM planet_osm_polygon
WHERE way_area > 100000
ORDER BY way_area DESC
) AS data LIMIT 0'


This is my 000-default.conf:



<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

LoadTileConfigFile /usr/local/etc/renderd.conf
ModTileRenderdSocketName /var/run/renderd/renderd.sock
# Timeout before giving up for a tile to be rendered
ModTileRequestTimeout 0
# Timeout before giving up for a tile to be rendered that is otherwise missing
ModTileMissingRequestTimeout 600

ModTileCacheDurationMax 31536000
ModTileCacheDurationMinimum 31536000
ModTileMaxLoadMissing 999999999
ModTileEnableTileThrottling Off
ModTileBulkMode Off
TimeOut 600

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog $APACHE_LOG_DIR/error.log
CustomLog $APACHE_LOG_DIR/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
Alias /log/ "/var/log/"
<Directory "/var/log/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from all
Require all granted
</Directory>
</VirtualHost>


My postgresql.conf:
https://pastebin.com/veYxsui5



I'm running the setup in Docker container on c5.xlarge instance on AWS.



How to eliminate 404s?










share|improve this question
























  • Same problem here, on a much more powerful system. The tiles do actually render and can be fetched a few seconds later, but the initial response is a 404. It's driving me crazy! Have you managed to fix this?

    – kontextify
    Apr 11 at 22:18











  • @kontextify I managed to minimize the problem. Unfortunately, I don't know what was the cause of this behavior. I tried many things. I stopped using Docker, I did something to permissions, I created more indexes in my PostgreSQL, I used pgtune to tune the Postgres...

    – Defozo
    Apr 12 at 11:43













1












1








1


1






When I request tiles I get sometimes 404 Not Found. Usually, if I request the same tile again it appears alright (with 200 OK).



This is what I found in renderd logs:



renderd[734]: An error occurred while loading the map layer 'default': Postgis Plugin: ERROR: could not open file "base/16386/240582": Interrupted system call
in executeQuery Full sql was: 'SELECT * FROM ( SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type
FROM planet_osm_polygon
WHERE way_area > 100000
ORDER BY way_area DESC
) AS data LIMIT 0'


This is my 000-default.conf:



<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

LoadTileConfigFile /usr/local/etc/renderd.conf
ModTileRenderdSocketName /var/run/renderd/renderd.sock
# Timeout before giving up for a tile to be rendered
ModTileRequestTimeout 0
# Timeout before giving up for a tile to be rendered that is otherwise missing
ModTileMissingRequestTimeout 600

ModTileCacheDurationMax 31536000
ModTileCacheDurationMinimum 31536000
ModTileMaxLoadMissing 999999999
ModTileEnableTileThrottling Off
ModTileBulkMode Off
TimeOut 600

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog $APACHE_LOG_DIR/error.log
CustomLog $APACHE_LOG_DIR/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
Alias /log/ "/var/log/"
<Directory "/var/log/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from all
Require all granted
</Directory>
</VirtualHost>


My postgresql.conf:
https://pastebin.com/veYxsui5



I'm running the setup in Docker container on c5.xlarge instance on AWS.



How to eliminate 404s?










share|improve this question
















When I request tiles I get sometimes 404 Not Found. Usually, if I request the same tile again it appears alright (with 200 OK).



This is what I found in renderd logs:



renderd[734]: An error occurred while loading the map layer 'default': Postgis Plugin: ERROR: could not open file "base/16386/240582": Interrupted system call
in executeQuery Full sql was: 'SELECT * FROM ( SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type
FROM planet_osm_polygon
WHERE way_area > 100000
ORDER BY way_area DESC
) AS data LIMIT 0'


This is my 000-default.conf:



<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

LoadTileConfigFile /usr/local/etc/renderd.conf
ModTileRenderdSocketName /var/run/renderd/renderd.sock
# Timeout before giving up for a tile to be rendered
ModTileRequestTimeout 0
# Timeout before giving up for a tile to be rendered that is otherwise missing
ModTileMissingRequestTimeout 600

ModTileCacheDurationMax 31536000
ModTileCacheDurationMinimum 31536000
ModTileMaxLoadMissing 999999999
ModTileEnableTileThrottling Off
ModTileBulkMode Off
TimeOut 600

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog $APACHE_LOG_DIR/error.log
CustomLog $APACHE_LOG_DIR/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
Alias /log/ "/var/log/"
<Directory "/var/log/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from all
Require all granted
</Directory>
</VirtualHost>


My postgresql.conf:
https://pastebin.com/veYxsui5



I'm running the setup in Docker container on c5.xlarge instance on AWS.



How to eliminate 404s?







openstreetmap tiles mapnik rendering mod-tile






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 12 '18 at 17:55







Defozo

















asked Jun 12 '18 at 17:36









DefozoDefozo

1165




1165












  • Same problem here, on a much more powerful system. The tiles do actually render and can be fetched a few seconds later, but the initial response is a 404. It's driving me crazy! Have you managed to fix this?

    – kontextify
    Apr 11 at 22:18











  • @kontextify I managed to minimize the problem. Unfortunately, I don't know what was the cause of this behavior. I tried many things. I stopped using Docker, I did something to permissions, I created more indexes in my PostgreSQL, I used pgtune to tune the Postgres...

    – Defozo
    Apr 12 at 11:43

















  • Same problem here, on a much more powerful system. The tiles do actually render and can be fetched a few seconds later, but the initial response is a 404. It's driving me crazy! Have you managed to fix this?

    – kontextify
    Apr 11 at 22:18











  • @kontextify I managed to minimize the problem. Unfortunately, I don't know what was the cause of this behavior. I tried many things. I stopped using Docker, I did something to permissions, I created more indexes in my PostgreSQL, I used pgtune to tune the Postgres...

    – Defozo
    Apr 12 at 11:43
















Same problem here, on a much more powerful system. The tiles do actually render and can be fetched a few seconds later, but the initial response is a 404. It's driving me crazy! Have you managed to fix this?

– kontextify
Apr 11 at 22:18





Same problem here, on a much more powerful system. The tiles do actually render and can be fetched a few seconds later, but the initial response is a 404. It's driving me crazy! Have you managed to fix this?

– kontextify
Apr 11 at 22:18













@kontextify I managed to minimize the problem. Unfortunately, I don't know what was the cause of this behavior. I tried many things. I stopped using Docker, I did something to permissions, I created more indexes in my PostgreSQL, I used pgtune to tune the Postgres...

– Defozo
Apr 12 at 11:43





@kontextify I managed to minimize the problem. Unfortunately, I don't know what was the cause of this behavior. I tried many things. I stopped using Docker, I did something to permissions, I created more indexes in my PostgreSQL, I used pgtune to tune the Postgres...

– Defozo
Apr 12 at 11:43










1 Answer
1






active

oldest

votes


















0














In my experience this means it's taking too long for renderd to do ad hoc rendering and you either need to pre-render most tiles or increase the resources renderd has to work with. You could test this by trying to reproduce the 404 error on tiles that you pre-render. If you can't reproduce it you could infer that the issue is the time it takes to render a new tile.



-Ali W






share|improve this answer


















  • 1





    It's not that. I sometimes get 404s instantly and the instance has 4 vCPUs and 8 GiB memory. I tried on bigger machines and the same problem persists.

    – Defozo
    Jun 22 '18 at 11:58











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "79"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f286070%2fserving-osm-tiles-mod-tile-renderd-postgresql-problem-i-sometimes-get-404-not%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














In my experience this means it's taking too long for renderd to do ad hoc rendering and you either need to pre-render most tiles or increase the resources renderd has to work with. You could test this by trying to reproduce the 404 error on tiles that you pre-render. If you can't reproduce it you could infer that the issue is the time it takes to render a new tile.



-Ali W






share|improve this answer


















  • 1





    It's not that. I sometimes get 404s instantly and the instance has 4 vCPUs and 8 GiB memory. I tried on bigger machines and the same problem persists.

    – Defozo
    Jun 22 '18 at 11:58















0














In my experience this means it's taking too long for renderd to do ad hoc rendering and you either need to pre-render most tiles or increase the resources renderd has to work with. You could test this by trying to reproduce the 404 error on tiles that you pre-render. If you can't reproduce it you could infer that the issue is the time it takes to render a new tile.



-Ali W






share|improve this answer


















  • 1





    It's not that. I sometimes get 404s instantly and the instance has 4 vCPUs and 8 GiB memory. I tried on bigger machines and the same problem persists.

    – Defozo
    Jun 22 '18 at 11:58













0












0








0







In my experience this means it's taking too long for renderd to do ad hoc rendering and you either need to pre-render most tiles or increase the resources renderd has to work with. You could test this by trying to reproduce the 404 error on tiles that you pre-render. If you can't reproduce it you could infer that the issue is the time it takes to render a new tile.



-Ali W






share|improve this answer













In my experience this means it's taking too long for renderd to do ad hoc rendering and you either need to pre-render most tiles or increase the resources renderd has to work with. You could test this by trying to reproduce the 404 error on tiles that you pre-render. If you can't reproduce it you could infer that the issue is the time it takes to render a new tile.



-Ali W







share|improve this answer












share|improve this answer



share|improve this answer










answered Jun 21 '18 at 18:35









Ali Goodnature-WieckowiczAli Goodnature-Wieckowicz

1




1







  • 1





    It's not that. I sometimes get 404s instantly and the instance has 4 vCPUs and 8 GiB memory. I tried on bigger machines and the same problem persists.

    – Defozo
    Jun 22 '18 at 11:58












  • 1





    It's not that. I sometimes get 404s instantly and the instance has 4 vCPUs and 8 GiB memory. I tried on bigger machines and the same problem persists.

    – Defozo
    Jun 22 '18 at 11:58







1




1





It's not that. I sometimes get 404s instantly and the instance has 4 vCPUs and 8 GiB memory. I tried on bigger machines and the same problem persists.

– Defozo
Jun 22 '18 at 11:58





It's not that. I sometimes get 404s instantly and the instance has 4 vCPUs and 8 GiB memory. I tried on bigger machines and the same problem persists.

– Defozo
Jun 22 '18 at 11:58

















draft saved

draft discarded
















































Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid …


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f286070%2fserving-osm-tiles-mod-tile-renderd-postgresql-problem-i-sometimes-get-404-not%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Magento 1.9 observer on only new product added ( no updated product )Admin Create New Order ObserverObserver checkout_cart_product_add_after get product quantity in cartHow can I differentiate between product creation and saving existing products?How to get the original price Product SaveBeforeMagento Observer for Admin Sales order Address updateHow do i get quantity in a product_save_after event observer magento2?Using observer event to get updated customer infoSave product observer - detect availabilityEvent not triggered when new product added in admin : Magento 2magento 1.9 observer on quantity product change

Does an object always see its latest internal state irrespective of thread? The 2019 Stack Overflow Developer Survey Results Are InDoes a finally block always get executed in Java?Java: serial thread confinement questionJava difference between fixed threadpool and scheduled threadpoolJackrabbit and concurrent modificationHow to stop a Runnable scheduled for repeated execution after a certain number of executionsMultiple threads accessing inner classHow can a loop be completed by two thread? say loop from count=1 to count=4 by ist thread and count =5 to 8 by 2nd thread?If I keep a reference to a Runnable, when does the Thread it ran on get released?How to stop a schedule ScheduledExecutorServiceHow to implement a singleThreadedScheduledExcecutor in wildfly

Adding contour labels to SpatialLinesDataFrame or sf object? The Next CEO of Stack OverflowTearing of SpatialLinesDataFrame and problem with gClip functionAutomatically adjusting map labelsExtracting data.frame from simple features object in RR convert sf object back to SpatialPolygonsDataFrameSimplify polygons of sf objectlines of a SpatialLinesDataFrame corresponding to pointsCropping sf object in R?Pattern matching with grepl on SpatialPolygonsDataFrame object in RHow to create and empty SpatialLinesDataFrame in RWarning message in raster::rotate(): “this does not look like an appropriate object for this function”