Connection slots error with Windows 64-bit Jitterbit private agents
Issue
This error is known to occur with Windows 64-bit private agents installed prior to the Harmony 10.14 release:
Failed to connect to back-end database "TranDb"
FATAL: remaining connection slots are reserved for non-replication superuser
connections
(0) SQL Error! SQLSTATE = 53300 Native err = 210 msg = FATAL: remaining connection slots are reserved for non-replication superuser connections
(1) SQL Error! SQLSTATE = IM006 Native err = 0 msg = [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
Details:
Unable to connect to database using connection string:
UID=jitterbit;PWD=<REMOVED>;SERVER=127.0.0.1;DRIVER={PostgreSQL ODBC
Driver(UNICODE)};DATABASE=TranDb;Port=6543;!
Resolution
To resolve this issue, increase the max_connections
and checkpoint_timeout
settings in the postgresql.conf
file on the Windows 64-bit private agent following these steps:
-
Make a backup copy of your
postgresql.conf
file and save it to another location. This file can be found in theC:\Program Files\PostgreSQL\9.x\data
directory. -
Open the
postgresql.conf
file in a text editor. -
Find the
max_connections
setting.# - Connection Settings - listen_addresses = '*' # what IP address(es) to listen on; # comma-separated list of addresses; # defaults to 'localhost'; use '*' for all # (change requires restart) port = 6543 # (change requires restart) max_connections = 100 # (change requires restart) #superuser_reserved_connections = 3 # (change requires restart) #unix_socket_directories = '' # comma-separated list of directories
-
Change this setting to
max_connections = 400
. -
Find the
checkpoint_timeout
setting.# - Checkpoints - #checkpoint_timeout = 5min # range 30s-1d #max_wal_size = 1GB #min_wal_size = 80MB
-
Change this setting to
checkpoint_timeout = 1h
and delete the comment marker (#
) the beginning of the line. -
Save your changes and restart the agent.