Configuration and Installation - AddstarMC/Prism-Bukkit Wiki
Remember: Join our Discord channel if you need more help.
How to Install
- Place the Prism.jar file in your bukkit /plugins directory.
- Start your server and an initial configuration file will be created. You must let the server create the config file.
- At the very least, you must setup a database connection
- read below if you need help with MySQL, or sqlite (no-install database).
Make sure you have MySQL installed. Most of you likely do already, but some of you are new to MySQL. You can use:
- Mysql - https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-20-04
- Percona - https://www.percona.com/doc/percona-server/8.0/installation/apt_repo.html
- Mariadb - https://www.digitalocean.com/community/tutorials/how-to-install-mariadb-on-ubuntu-20-04
(for the love of god please use a Linux server, but if you must here are the links
- MySQL - https://dev.mysql.com/doc/refman/8.0/en/windows-installation.html
- Percona - NOT SUPPORTED (because the Percona devs are smart)
- MariabDB - https://mariadb.com/kb/en/installing-mariadb-msi-packages-on-windows/
Make sure the database.mode config says "mysql". The information you need:
- Hostname - defaults is
- UserName - default is
- Password - default is
- Database Name - default is
- Port - default is
Modify the file
config.yml found in the
mysql: hostname: localhost username: prism password: prism databaseName: prism prefix: prism_ ## you can change this if you use single database. port: '3306' useNonStandardSql: true ## you should change this if you use Mariadb to `false` database: max-failures-before-wait: 5 actions-per-insert-batch: 300 force-write-queue-on-shutdown: true
If you setup your MySQL server yourself, you should know what the above information is. If you're using a mysql server setup by someone else (like on a shared hosting service), they will provide you the information.
!!IMPORTANT!! If you receive an error saying
any_value does not exist, you are probably using MariaDB. Please set
useNonStandardSql: false in your config.
Start your server and look for any console errors saying that Prism can't connect to a database.
If you have trouble run
/prism debug this will work even if the db connection fails. Post the provided link to the discord server. Dont make an issue we will just close it.
If you're concerned about disk space or if you have a busy server, we recommend leaving off water-flow and turning off lava-flow tracking. These events not only occur with extreme frequency, but Bukkit also fires these events multiple times per block location. They can very quickly saturate your database. It's relatively easy to use /prism drain instead. However, Prism tracks lava/water-break events even if flow is disabled, so you can still rollback the items broken by the liquid.
We get technical here. If you're not sure what these recommendations refer to, please skip.
Constantly seeing pool exhaustion errors? The cause normally isn't prism, but a problem communicating with the database fast enough. There's a lot you can do. If you have a remote mysql server, it's usually a lot slower because the server has to communicate across the internet every query, and shared mysql hosts are usually a bit lax on performance.
- Decrease the pool wait times.
- Increase the pool connection limit if your remote mysql provider has a limit that will fit it.
- If you can spare a little more memory, increase the actions per batch so a mysql query sends more data during larger changes.
Advanced Database Configurations
We allow you to make some adjustments to how we connect and talk to a database - which is useful if you either have a remotely-hosted mysql server or want to increase performance because you have a local mysql server you control.
Advanced database control is handled in a seperate configuration file 'hikari.properties'. This allows for extreme tuning of the database connection. Read more here
This generally shouldn't need to be adjusted.
Faster Event Logging
Our defaults for the speed of event logging are set to sensible defaults with the medium-range servers average owners use. However, if you have more control over your server you can tweak Prism to record events faster. actions-per-insert-batch refers to how many actions are sent per batch insert. The only things that limit this are memory (ram), and your mysql server's setting for max_allowed_packets. It's very possible to increase this number to 5000 or higher. Every time the recorder runs, it will empty the queue with batch insert statements, and by changing it to 5000 instead of 1000, increases the speed that the queue is emptied dramatically. A 110k block world edit saves in 19 seconds with the default settings, but saves in 5 seconds with the increased batch size. queue-empty-tick-delay - This determines how many ticks (20 ticks = 1 second) the recorder will wait before checking the queue again. Setting this to a lower number will increase the speed of queue saves. For example, the default is 3 ticks which roughly means 6 queue empty actions per second.
When the recorder checks the queue, it will empty the entire queue in batches, so either way the queue will be emptied, this setting simply makes it check for newer actions more often.
Prism will use a couple of providers if they are made available.
Prism can use world edit selections
Provides a details metrics reporting to understand your server load better. This is a local reporter.
Prism reports usage to Bstats - you can turn this off if you wish. It is anonymous and helps us decide on where needs the most work going forward.