Configuration and Installation - AddstarMC/Prism-Bukkit Wiki

Installation

Remember: Join our Discord channel if you need more help.

How to Install

Get MySQL

Make sure you have MySQL installed. Most of you likely do already, but some of you are new to MySQL. You can use:

Ubuntu
Windows

(for the love of god please use a Linux server, but if you must here are the links

MYSQL

Step 1

Make sure the database.mode config says "mysql". The information you need:

  1. Hostname - defaults is localhost
  2. UserName - default is prism
  3. Password - default is prism
  4. Database Name - default is prism
  5. Port - default is 3306
Step 2

Modify the file config.yml found in the <server>/plugin/Prism/ directory.

  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.

Step 3

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.

Recommendations

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.

Advanced Configuration

We get technical here. If you're not sure what these recommendations refer to, please skip.

Pool Exhaustion

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.

Recommendation:

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.

Hooks

Prism will use a couple of providers if they are made available.

  1. WorldEdit

Prism can use world edit selections

  1. DripReporter

Provides a details metrics reporting to understand your server load better. This is a local reporter.

  1. Bstats

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.