# 1.0.0.2859 Database timeout when starting new builds

**URL:** https://www.finalbuilder.com/forums/t/1-0-0-2859-database-timeout-when-starting-new-builds/5891
**Category:** Bugs
**Created:** [February 10, 2014, 11:51am UTC](https://www.finalbuilder.com/forums/t/1-0-0-2859-database-timeout-when-starting-new-builds/5891 "2014-02-10T11:51:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![chillefeld](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/chillefeld/32/1333_2.png) [@chillefeld](https://www.finalbuilder.com/forums/u/chillefeld)
#### Post date: [February 10, 2014, 11:51am UTC](https://www.finalbuilder.com/forums/t/1-0-0-2859-database-timeout-when-starting-new-builds/5891/1 "2014-02-10T11:51:11Z")

</div>

Hi,  
recently we keep getting timeouts when starting new builds from Continua after the server has been running for a while.&nbsp;Normally restarting the Continua and Postgres services helps in that situation but that is quite inconvenient. We are using an imported database from our old buildserver.   
The error message is  
&nbsp; Exception: NpgsqlException  
&nbsp; Message: A timeout has occured. If you were establishing a connection, increase Timeout value in ConnectionString. If you were executing a command, increase the CommandTimeout value in ConnectionString or in your NpgsqlCommand object.  
&nbsp; Stack Trace:&nbsp;&nbsp;&nbsp; at Npgsql.NpgsqlState.ProcessBackendResponsesEnum(NpgsqlConnector context)  
&nbsp;&nbsp;&nbsp;&nbsp; at Npgsql.NpgsqlCommand.GetReader(CommandBehavior cb)  
&nbsp;&nbsp;&nbsp;&nbsp; at Npgsql.NpgsqlCommand.ExecuteNonQuery()  
&nbsp;&nbsp;&nbsp;&nbsp; at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd)  
&nbsp;&nbsp;&nbsp;&nbsp; at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IExpectation expectation)  
&nbsp;&nbsp;&nbsp;&nbsp; at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session)  
  
The full entry from Continua event log is attached.

---

<div class="post-metadata">

### Author: ![chillefeld](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/chillefeld/32/1333_2.png) [@chillefeld](https://www.finalbuilder.com/forums/u/chillefeld)
#### Post date: [February 10, 2014, 11:53am UTC](https://www.finalbuilder.com/forums/t/1-0-0-2859-database-timeout-when-starting-new-builds/5891/2 "2014-02-10T11:53:40Z")

</div>

Okay apparently I cannot attach files so here is the full event log entry  
  
Importance: Error  
  
Date: Monday, February 10, 2014  
Time: 11:28:52 AM  
  
Message:  
  
Unhandled Service Exception  
  
Exception: GenericADOException  
Message: could not insert: [Continua.Modules.Builds.BuildRepository#52ed2f45-427f-4153-a81d-a2ce00bd1d2a][SQL: INSERT INTO builds\_buildrepository (CacheRevision, Branch, Branchdisplayname, RepositoryId, BuildId, id) VALUES (?, ?, ?, ?, ?, ?)]  
Stack Trace:&nbsp;&nbsp;&nbsp; at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session)  
&nbsp;&nbsp; at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Object obj, ISessionImplementor session)  
&nbsp;&nbsp; at NHibernate.Action.EntityInsertAction.Execute()  
&nbsp;&nbsp; at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)  
&nbsp;&nbsp; at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)  
&nbsp;&nbsp; at NHibernate.Engine.ActionQueue.ExecuteActions()  
&nbsp;&nbsp; at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)  
&nbsp;&nbsp; at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)  
&nbsp;&nbsp; at NHibernate.Impl.SessionImpl.Flush()  
&nbsp;&nbsp; at NHibernate.Transaction.AdoTransaction.Commit()  
&nbsp;&nbsp; at Continua.Shared.Data.Hibernate.NHibernateDatabase.SaveChanges()  
&nbsp;&nbsp; at Continua.Modules.Builds.BuildManager.QueueUsersBuild(Configuration configuration, User user, BuildPriority priority, IDictionary`2 variables, BuildChangesetAssociationOptions associationOptions, IDictionary`2 repositoryBranches, String comment)  
&nbsp;&nbsp; at Continua.Modules.Builds.Services.ConfigurationService.Start(Guid configurationId, BuildPriority priority, BuildChangesetAssociationOptions associationOptions, String comment, IDictionary`2 variables, IDictionary`2 repoBranches)  
&nbsp;&nbsp; at SyncInvokeStart(Object , Object[] , Object[] )  
&nbsp;&nbsp; at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)  
&nbsp;&nbsp; at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)  
&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)  
&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)  
&nbsp;&nbsp; at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)  
  
Exception: NpgsqlException  
Message: A timeout has occured. If you were establishing a connection, increase Timeout value in ConnectionString. If you were executing a command, increase the CommandTimeout value in ConnectionString or in your NpgsqlCommand object.  
Stack Trace:&nbsp;&nbsp;&nbsp; at Npgsql.NpgsqlState.ProcessBackendResponsesEnum(NpgsqlConnector context)  
&nbsp;&nbsp; at Npgsql.NpgsqlCommand.GetReader(CommandBehavior cb)  
&nbsp;&nbsp; at Npgsql.NpgsqlCommand.ExecuteNonQuery()  
&nbsp;&nbsp; at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd)  
&nbsp;&nbsp; at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IExpectation expectation)  
&nbsp;&nbsp; at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session)
