The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Stash - Hibernate could not open a connection

Jen Connor
Contributor
June 1, 2014

Stash was unavailable last night. After some digging around it looks like it is either the connection to the database or tomcat memory. Can someone confirm which and what the solution is?

Jun 02, 2014 2:14:46 AM org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Servlet.service() for servlet [scmServlet] in context with path [] threw exception

org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Could not open connection

[More of the error message here]


Caused by: org.hibernate.exception.JDBCConnectionException: Could not open connection

at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:132)

at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)

at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)

at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)

at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:235)

at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:171)

at org.hibernate.internal.SessionImpl.connection(SessionImpl.java:450)

at org.springframework.orm.hibernate4.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:429)

... 132 more

Caused by: java.sql.SQLException: Timed out waiting for a free available connection.

at com.jolbox.bonecp.BoneCP.getConnection(BoneCP.java:503)

at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:114)

at com.atlassian.stash.internal.hibernate.DelegatingSwappableDataSource.getConnection(DelegatingSwappableDataSource.java:48)

at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139)

at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:380)

at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:228)

... 135 more

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 1, 2014

Hi Jen,

For some reason no database connection could be obtained. This could be because the database server was temporarily unreachable or because the server was under such high load that all database connections were already in use.

Can you open a support ticket on https://support.atlassian.comand upload a support zip so we can have a look at your logs?

Cheers,

Michael

Jen Connor
Contributor
June 1, 2014

Does Stash have a temporary buffer where it writes locally if the databse is unavailable? If so, how long does it write for?

I'm asking because it looks like our database was not writable for two hours and for the first hour Stash continued to function.

Alan Qian
October 14, 2014

We encountered the same issue yesterday. What was the resolution/root cause to this issue?

TAGS
AUG Leaders

Atlassian Community Events