[mapserver-users] Mapcache instruction

Sebastiano Laini Sebastiano.Laini at BuchananComputing.co.uk
Thu Sep 20 05:39:34 PDT 2018


Thanks guys,

I will try to do it after I will recompile again Mapcache to use SQLite as I compite it -DWITH_SQLITE=OFF \

I suppose that I can also think about to split the db as we are speaking about more than 10milion files.

How exactly do you call the database and how this code /{grid}/{tileset}/{z}/{x}-{y} works?

Sebastiano

From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of lars.schylberg at blixtmail.se
Sent: 20 September 2018 13:13
To: mapserver-users <mapserver-users at lists.osgeo.org>
Subject: Re: [mapserver-users] Mapcache instruction

I also ran into the problem of running out of i-nodes last year.

Here is the configuration I have with a sqlite cache:

<cache name="Nordic_sqlite" type="sqlite3">
<dbfile>/data/mapcache/{grid}/{tileset}/{z}/{x}-{y}.sqlite3</dbfile>
<xcount>10000</xcount>
<ycount>10000</ycount>
<pragma name="max_page_count">1573741823</pragma>
</cache>

I guess the pragma thing is described in the documentation.
xcount and ycount describes how much You want to store in each sqlite db file before it creates a new db file.
mapcache is creating the db files automatically. So seeding a large area You end up with many sqlite db files that all work together.

This has worked really good for our use case.

Lars Schylberg


September 20, 2018 1:24 PM, "Yves Jacolin" <yves.jacolin at camptocamp.com<mailto:yves.jacolin at camptocamp.com?to=%22Yves%20Jacolin%22%20%3cyves.jacolin at camptocamp.com%3e>> wrote:
Here a short tuto from my personal notes:
1. create a cache entry in your mapcache file

 <cache name="mbtiles" type="sqlite3"> <dbfile>/var/www/osm_google.db</dbfile> </cache>
2. create a empty sqlite file
- run sqlite3
- run this commande inside sqlite3: ".save filename.db" (without ")
3. use this cache in your settings
You don't need MySQL or PostgreSQL, only sqlite3 and its dependencies. Path used in my example for cache block are for Unix like system, you should adapt it for Windows : c:/....
Y.
Le jeu. 20 sept. 2018 à 13:07, Sebastiano Laini <Sebastiano.Laini at buchanancomputing.co.uk<mailto:Sebastiano.Laini at buchanancomputing.co.uk>> a écrit :

Hi all,

We have a MapCache setup with “disk_cache” but we are running out of Inodes when I try to seed the whole UK with projection 27700.

I was thinking to propose to my supervisor to use the “SQLite Caches” but I don’t know how it works. Can someone guide me through the process of setup MapCache with this type of cache? And if I need some dependency, we use PostgreSQL in our server so I assume I need to install also MySQL.

I’ve already read the documentation but still I have doubt about the db part, how to create the db and locate it. I never use SQLite, just PostgreSQL.

Regards;

Sebastiano.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users


--
Training and support manager
Camptocamp
Bâtiment le Dauphin - 1er étage
18 rue du Lac Saint André
73382 Le Bourget-du Lac

Tel (France) : +33 4 58 48 20 43
Tel (Switzerland) : +41 21 619 10 43
Mob. : +33 6 18 75 42 21

email : yves.jacolin at camptocamp.com<mailto:yves.jacolin at camptocamp.com>
http://www.camptocamp.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20180920/cce06223/attachment-0001.html>


More information about the mapserver-users mailing list