Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bamboo Deployment Crashes on Hibernate JDBC Connection Error

Deleted user July 10, 2015

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

 

2 answers

1 vote
rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 10, 2015

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:

&lt;property name="hibernate.c3p0.max_size"&gt;100&lt;/property&gt;

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&gt; 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

0 votes
HarryH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 10, 2015

It may be because of memory leak, please restart the MySQL to see if it helps.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events