3

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?

2
  • 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
    Commented Apr 11, 2019 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
    Commented Apr 12, 2019 at 11:43

1 Answer 1

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.

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
    Commented Jun 22, 2018 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.