Minepacks

Minepacks

2M Downloads

Minepacks database connection

BlitzOffline opened this issue ยท 1 comments

commented

Hello. For the last few days all my plugins that were connected to my database kept getting errors.
I might have understand what the problem is and solved it for the others plugin. But for Minepacks I still get it :
Minepacks-Connection-Pool - Failed to validate connection com.mysql.jdbc.JDBC4Connection@494528a9 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.

I can't find in the config somewhere to change the Lifetime value.

commented

Please download this build: https://ci.pcgamingfreaks.at/job/Minepacks/161/artifact/a/Minepacks-2.1.8-Release.jar
It will detect if you add a MaxLifetime option after the MaxConnections option. This option is set in seconds and you can set it to whatever works best for you.
Example:

 # Settings only for MySQL
  SQL:
    Host: localhost:3306
    Database: minecraft
    User: minecraft
    Password: minecraft
    # The max amount of connections to the database the connection pool will open
    MaxConnections: 2
    MaxLifetime: 60