We're experiencing intermittent deployment failures. It seems to stem from Hibernate not being able to obtain a connection from our MySQL database. Bamboo 5.8.1 and MySQL 5.5, both running as Windows NT services. At the lowest level it's a ResourcePool exception. Has anyone out there seen this? i can't find any reference to it on this site.
thanks,
ed
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
...
Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: com.mchange.v2.resourcepool.ResourcePoolException: A ResourcePool cannot acquire a new resource -- the factory or source appears to be down
Hello Edward,
Thank you for your question.
Under "<bamboo-home>/bamboo.cfg.xml" you will find the following property that describes how many database connection poll Bamboo will be running:
<property name="hibernate.c3p0.max_size">100</property>
The default 100 is given when installing Bamboo 5.8.1, however, if you came in from an upgrade, this value could be different.
Based on the log entry above, it seems the value above is not enough to handle the amount of requests to your database and, in this case, the same needs to be increased (i.e.: 200).
However, only increasing Bamboo will not make any difference if you MySQL is not configured to handle those connections. Please, connect to you MySQL database from Command Prompt / Terminal using the information presented in "<bamboo-home>/bamboo.cfg.xml":
# connect to database mysql -u USERNAME -pPASSWORD -h HOSTNAMEORIP DATABASE # show maximum connections value mysql> show variables like '%max_connections%'; +-----------------------------------------------+-----------------+ | Variable_name | Value | +-----------------------------------------------+-----------------+ | max_connections | 100 | +-----------------------------------------------+-----------------+
If the value in max_connections is lower than the one increased in Bamboo, please open my.ini (Windows) / my.cnf (Linux/MacOSX) and increase this value.
For any change described in here it is required restart the application so the changes will be applied.
If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.
Thank you for your understanding.
—
Kind regards,
Rafael P. Sperafico
Atlassian Support
It may be because of memory leak, please restart the MySQL to see if it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.