Alright, so I’ve seen here and there over and over time and time again about Dynmap causing WebUI slowdowns and crashes due to the many files it has and the size of it’s directory. I believe that I may have once had that problem a few years back as well though it was never really as bad as it seems to be for most of you who’ve had the problem (it wasn’t really very noticeable at all actually I don’t think, as it was always pretty snappy and useable just as long as I had a good and stable connection), however one thing that I did do/change within Dynmap’s configuration is to NOT use [the]
files/filesystem/filetree and to INSTEAD generate/create and use a
sqlite database file, though using mysql for this may also work fine if not even better.
storage: # Filetree storage (standard tree of image files for maps) type: filetree # SQLite db for map storage (uses dbfile as storage location) #type: sqlite #dbfile: dynmap.db # MySQL DB for map storage (at 'hostname':'port' in database 'database' using user 'userid' password 'password' and table prefix 'prefix' #type: mysql #hostname: localhost #port: 3306 #database: dynmap #userid: dynmap #password: dynmap #prefix: ""
Note that this is the default, and is only here to show you where exactly to look; you’ll want to comment out (
type: filetree” and uncomment “
#type: sqlite” as well as “
mysql is/will be a bit more difficult to set up and configure so I won’t really cover that here (if I am to use it I need way more practice with it anyways since it is complex and rather confusing at times to me, though maybe that was because I was trying to configure it for
FiveM's ESX Server Mods which I eventually did manage to complete but it was rather painful).
You’ll want it to look something like this for using
storage: # Filetree storage (standard tree of image files for maps) #type: filetree # SQLite db for map storage (uses dbfile as storage location) type: sqlite dbfile: dynmap.db
Essentially what this does is create a single database file, and you know, thinking about it, since it does ask you for a name to name the file, I think you may also be able to specify a location that is outside of the server directory, which if switching to sqlite (as well as manually deleting all of the existing map files within the Dynmap map directory - whatever that directory is named/called, you should know pretty instantly as you’ll see tiles of different parts of your Minecraft world/the map within it - within the server’s directory) doesn’t fix it for you then maybe moving that file someplace else that is completely outside of the main base
servers directory then pointing Dynmap to it; example commands and configuration below:
storage: # Filetree storage (standard tree of image files for maps) #type: filetree # SQLite db for map storage (uses dbfile as storage location) type: sqlite dbfile: /var/games/minecraft/dynmapdbfiles/server.db
Again please do not just simply copy and paste these but use them as reference.
The location can pretty much be anywhere (well almost anywhere), and as for
server.db, you ideally would want to change this to something per-server, such as matching your server names exactly for example. One thing to note is going this far will also exclude the dynmap sqlite db files from backups and archives, as well as restores, though dynmap should end up updating it anyways and it likely isn’t really anywhere as important as the actual server itself so no big deal I’m sure.