Skip to Content

Connection Slots Error with Windows 64-bit 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:

  1. Make a backup copy of your postgresql.conf file and save it to another location. This file can be found in the C:\Program Files\PostgreSQL\9.x\data directory.

  2. Open the postgresql.conf file in a text editor.

  3. 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
    
  4. Change this setting to max_connections = 400.

  5. Find the checkpoint_timeout setting.

    # - Checkpoints -
    
    #checkpoint_timeout = 5min      # range 30s-1d
    #max_wal_size = 1GB
    #min_wal_size = 80MB
    
  6. Change this setting to checkpoint_timeout = 1h and delete the comment marker (#) the beginning of the line.

  7. Save your changes and restart the agent.