KB Article #178010

Error in the startup of B2Bi- “Failed to acquire connection Sleeping for 7000ms and trying again”

Problem

After installing B2Bi 2.1.0 with Synchrony Database 4.6.0, TE nodes unable to start.

Error in <hostname>_cn.log-

2016-06-28 11:13:02,144 - INFO [Startup] (AxwayBoneCPConnectionHook.:45) - Axway BoneCP Connection Pool Hook initialized with extra termination state codes: [08006]
2016-06-28 11:13:02,507 - ERROR [Startup] (AbstractConnectionHook.onAcquireFail:77) - Failed to acquire connection Sleeping for 7000ms and trying again. Attempts left: 5. Exception: null
2016-06-28 11:13:09,517 - ERROR [Startup] (AbstractConnectionHook.onAcquireFail:77) - Failed to acquire connection Sleeping for 7000ms and trying again. Attempts left: 4. Exception: null

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Too many connections



Resolution

Set the maximum connections-

  1. Go to the directory: <Axway_Database_install_directory>/conf/
  2. Open the my.ini file in a text editor.
  3. Set the value of the max_connections attribute to 800.(If the line is not in the file just add the line max_connections = 800)
  4. Save the file.
  5. Restart Axway Database.

If the installation is on Linux box, it has been noticed that the issue occur when the number of open files/ running processes allowed for the user running B2bi is too low. To resolve this, change the O/S parameters (soft/hard limits for "nofile" and "nproc") in the files /etc/security/limits.conf.

Here is an example (for a username 'axway')

#<domain> <type> <item> <value>

axway soft nproc 50000

axway hard nproc 50000

axway soft nofile 50000

axway hard nofile 50000

Restart B2Bi and repeat this for all nodes (in case of more than 1 node).