# Database timeouts when queueing builds

**URL:** https://www.finalbuilder.com/forums/t/database-timeouts-when-queueing-builds/5211
**Category:** Discussion
**Created:** [August 12, 2014, 7:43am UTC](https://www.finalbuilder.com/forums/t/database-timeouts-when-queueing-builds/5211 "2014-08-12T07:43:25Z")
**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: [August 12, 2014, 7:43am UTC](https://www.finalbuilder.com/forums/t/database-timeouts-when-queueing-builds/5211/1 "2014-08-12T07:43:25Z")

</div>

Hi,  
  
in the last few weeks we have been having problems with our Continua installation. Often when queueing builds we receive database timeouts.  
The full entry from Continua's event log looks like this:  
  
  
Importance: Error  
  
Date: Monday, August 11, 2014  
Time: 12:10:18 PM  
  
Message:  
  
Unhandled Service Exception  
  
Exception: GenericADOException  
Message: could not insert: [Continua.Modules.Builds.BuildRepository#d00baa2f-516f-4fa2-85b7-a38400c87ed0][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)  
  
  
  
Is this a known problem? If so is there anything I can do to prevent these?  
Whenever we receive one of these Errors only restarting the Continua services seems to help.  
  
Regards,  
Christoph

---

<div class="post-metadata">

### Author: ![peter.toms](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/df788c/32.png) [@peter.toms](https://www.finalbuilder.com/forums/u/peter.toms)
#### Post date: [August 13, 2014, 9:41am UTC](https://www.finalbuilder.com/forums/t/database-timeouts-when-queueing-builds/5211/2 "2014-08-13T09:41:45Z")

</div>

Hi Christoph, thank you for posting. We are sorry to hear that your having an issue here.   
  
Timeouts can be caused by a number of factors (we don’t currently have any open issues in this area). In order to assist further could please get some additional information off you.   
  
When you start receiving such errors would could you please send the following details to [support@finalbuilder.com](mailto:support@finalbuilder.com):   
  
Log into your Continua server, connect to your PostgreSQL install (we have included pgadmin3 as part of the Continua install at ‘/VSoft Technologies/ContinuaCI/Server/PostgreSQL/pgAdmin3.exe’) and run:   
  
SELECT \* FROM pg\_stat\_activity   
SELECT \* FROM pg\_stat\_user\_tables   
SELECT COUNT(\*) from core\_privatemessage.   
  
Whilst you are on the server could you please also let us know;   
  
how much CPU / RAM/ Diskspace you have free (for example, can you see a run a way process, or something else taking up large CPU cycles)   
how many concurrent builds are running when the issue occurred   
how are the builds structures (how many repo’s etc)   
the size of your C:\ProgramData\VSoft\Continua folder   
The Version of Continua you are running, are you running the bundled PostgreSQL install ?   
Do you have any scheduled backup or Virus scanning software that occurs around these times (can you see a pattern to the issue)   
If the issue is happening regularly would you please be able to run a build with full debugging enabled ([http://wiki.finalbuilder.com/display/continua/Debug+Logging](http://wiki.finalbuilder.com/display/continua/Debug+Logging)).   
If you are running the beta could we please have a diagnostics dump ([http://SERVERNAME/administration/diagnosticsreport](http://SERVERNAME/administration/diagnosticsreport))   
  
Once we have these details we can look closer to better understand the issue.   
  
Thank you.
