[mapserver-users] Mapcache: error with Berkeley DB and display tiles

Eichner, Andreas - SID-NLKM Andreas.Eichner at sid.sachsen.de
Thu Jan 23 01:03:03 PST 2014


> Thanks Andreas for your response. I changed all the permissions to
> read, write and the owner, after restarting apache, it fails
> displaying tiles in the demo and report the same error:
> 
> "failed to aquire connection to bdb backend: unknown error"
> 
> I followed the instructions to check the database created with db_sql
> according to [1] but I get the same error:
> 
> > db5.1_sql ortofoto.db
> 
> "ortoforo.db: multiple databases specified but not supported by file"
> "Error: file is encrypted or is not a database"
> 
> I have little knowledge of this type of database, but I would to
> evaluate the loading speed of tiles.

It seems there is a misunderstanding of the usage of Berkley DB. BDB is a library implementing a key/value store and is quite flexible in what can be used as key and value.
And that's the way MapCache uses it. The key is a string representing tileset, zoomlevel and any used dimension but at least (x, y) and the value is the image BLOB. So there will be a single BDB cache stored in a directory (because BDB uses multiple files) for all tilesets configured to use this cache.
The error message you got is a mixed result of BDB (1st: "multiple ...") and SQLite (2nd: "file is encrypted..."). This is a new feature since Oracle Berkeley DB 11g. It combines the flexibility of the SQLite database engine with the strengths of the BDB used as storage backend. See [1] for more info on that.
Although both use-cases use BDB as backend they are in fact completely different and cannot be mixed together. So you cannot use dbsql to inspect the tilecache. You have to use mapcache_seed to manipulate it (seed/reseed, clean).

HTH

[1] http://www.oracle.com/technetwork/database/berkeleydb/overview/sql-160887.html



More information about the MapServer-users mailing list