Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can be pre-rendered tiles on other PC? #324

Open
jbalcar opened this issue Jun 11, 2023 · 1 comment
Open

Can be pre-rendered tiles on other PC? #324

jbalcar opened this issue Jun 11, 2023 · 1 comment

Comments

@jbalcar
Copy link

jbalcar commented Jun 11, 2023

Hello,

I have server and pc with same data set. Can be pre-rendered one zoom on PC and after it copy on server? Which files must be copied for succesfull operation?

Because when I copy /var/cache/renderd/tiles/s2o/, it is re-rendered when it use by apache2.

Thanx

@jbalcar jbalcar changed the title Can be pre-rendered tile on other server? Can be pre-rendered tiles on other PC? Jun 11, 2023
@hummeltech
Copy link
Collaborator

hummeltech commented Mar 21, 2024

@jbalcar, there shouldn't be a problem with copying metatiles over (assuming the map layer configuration is the same on both systems.) I suspect that you have some configuration that it causing mod_tile to determine that the tiles need to be re-rendered.

Have you resolved this issue yet? If not, feel free to provide your mod_tile configuration. Here are the options I had in mind:

# Caching is always a trade-off between being up to date and reducing server load or
# client side latency and bandwidth requirements. Under some conditions, like poor
# network conditions it might be more important to have good caching rather than the latest tiles.
# Therefor the following config options allow to set a special hostheader for which the caching
# behaviour is different to the normal heuristics
#
# The CacheExtended parameters overwrite all other caching parameters (including CacheDurationMax)
# for tiles being requested via the hostname CacheExtendedHostname
#
#ModTileCacheExtendedHostname cache.tile.openstreetmap.org
#ModTileCacheExtendedDuration 2592000
# Upper bound on the length a tile will be set cacheable, which takes
# precedence over other settings of cacheing
ModTileCacheDurationMax 604800
# Sets the time tiles can be cached for that are known to by outdated and have been
# sent to renderd to be rerendered. This should be set to a value corresponding
# roughly to how long it will take renderd to get through its queue. There is an additional
# fuzz factor on top of this to not have all tiles expire at the same time
ModTileCacheDurationDirty 900
# Specify the minimum time mod_tile will set the cache expiry to for fresh tiles. There
# is an additional fuzz factor of between 0 and 3 hours on top of this.
ModTileCacheDurationMinimum 10800
# Lower zoom levels are less likely to change noticeable, so these could be cached for longer
# without users noticing much.
# The heuristic offers three levels of zoom, Low, Medium and High, for which different minimum
# cacheing times can be specified.
#Specify the zoom level below which Medium starts and the time in seconds for which they can be cached
ModTileCacheDurationMediumZoom 13 86400
#Specify the zoom level below which Low starts and the time in seconds for which they can be cached
ModTileCacheDurationLowZoom 9 518400
# A further heuristic to determine cacheing times is when was the last time a tile has changed.
# If it hasn't changed for a while, it is less likely to change in the immediate future, so the
# tiles can be cached for longer.
# For example, if the factor is 0.20 and the tile hasn't changed in the last 5 days, it can be cached
# for up to one day without having to re-validate.
ModTileCacheLastModifiedFactor 0.20

Also, be sure that the ownership and permissions are the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants