IMPORTANT: PaperCut’s default database settings are suitable for customers of all sizes. Tuning these settings is not typically required. If you are experience database connection issues, please contact support before experimenting with these settings.
This knowledge base article is targeted at experienced DBAs running PaperCut on external databases such as Oracle, Postgresql, Microsoft SQL Server or MySQL.
Database tuning parameters are configured via the database connection details in the server.properties file located at:
This file may be edited with a standard text editor. The following tuning parameters may be appending to this file:
Maximum number of database connections the pool will maintain at any given time. If your DB has a hard limit (e.g. Oracle or MySQL), consider setting this to slightly below the hard-limit. e.g. if the DB hard-limit is 200 then set to 190. However, we generally to NOT recommend reducing this as it may cause problems under high system load. If you are seeing consistently high database connection usage, please contact support.
database.pool.max-pool-size=<Dynamic based on system - typically 400>
Minimum number of database connections the pool will maintain at any given time. Do not set this too high, as it will be very wasteful of database resources. 20 is a good default for most sites, and we would not recommend this be changed for the vast majority of sites.
Seconds a connection can remain pooled but unused before being discarded. This allows idle connections to be periodically renewed to clear out stale connections (e.g. if DB is restarted). This MUST always be set to a value greater than or equal to
Number of seconds that connections in excess of
should be permitted to remain idle in the pool before being culled. Zero means no enforcement and excess connections will not be removed. However, setting to zero is NOT
recommended, as connections will be wasted . 60 seconds is a reasonable configuration, but could be set as low as 10 seconds to free connections quickly. This MUST always be set to a value equal to or lower than
Test idle connections every number of seconds. If the connection is found to be dead it will be removed from the pool. If the connection idle timeouts are set to 60 seconds or less, it is recommended to disable the connection test by setting this value higher than idle time.
Categories: Databases, Architecture
keywords: database connection limits, RDMS, performance, data base configuration