FailDBInsert when branching

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
ereddell
Posts: 10
Joined: Wed Sep 27, 2006 8:13 am

FailDBInsert when branching

Post by ereddell » Wed Sep 27, 2006 8:41 am

Hi,

I'm having a frustrating problem while branching. Basically branching for us no longer works. The following is the error in the messages tab we recieve:

[9/27/2006 8:31:29 AM] Preparing data to begin transaction
[9/27/2006 8:31:29 AM] Beginning transaction
[9/27/2006 8:31:35 AM] Branch $/Main
[9/27/2006 8:31:35 AM] Ending the transaction
[9/27/2006 8:37:56 AM] Server unavailable for transaction end
[9/27/2006 8:37:56 AM] An exception was encountered during the transaction. Exception: Exception of type System.Exception was thrown. at VaultClientOperationsLib.ClientInstance.Commit(ChangeSetItemColl givenItems, Boolean keepCheckedOut, Boolean removeLocalCopy, Boolean bIsImport, DateTime dateImport, Int32 nUserIDImport, Int64& nRevID)
[9/27/2006 8:37:56 AM] Transaction failed
[9/27/2006 8:37:56 AM] Transaction failed

The Server Log is as follows:

----9/27/2006 8:29:34 AM sgvaultsystem--()--
System Started
Version 3.0.7.2863
Cache Level = 1
DataBase Buffer Size (KB) = 256
LogFile Path = C:\WINDOWS\Temp\sgvault
Log Level = Debug
Archive Log = Weekly
ReverseDNS Lookup = True
Maximum HTTP Request Length = 102400
Overwrite Log on Startup = False
Session Timeout = 4320
Active Directory Domain =
SGVault Working Directory = C:\WINDOWS\Temp
SGVault Server URL =
Identity = NT AUTHORITY\NETWORK SERVICE
----9/27/2006 8:30:28 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled Login
----9/27/2006 8:30:28 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled GetUserOptions returned: Success
----9/27/2006 8:30:29 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled GetRepositories returned: Success
----9/27/2006 8:30:29 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled GetUserList returned: Success
----9/27/2006 8:30:31 AM --192.168.0.221(192.168.0.221)--SSL Disabled Getting repository Structure.
----9/27/2006 8:30:32 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled Getting repository Structure.
----9/27/2006 8:30:32 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled VaultServiceAPI::GetRepositoryTreeDelta() UserID:3 RepID:5 Base:38086 Target:38086 Calling VaultRepUtil.DiffRepTrees() - in-memory tree diff.
----9/27/2006 8:30:32 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled GetRepositoryStructure returned: Success
----9/27/2006 8:30:32 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled Getting list of checkout changes.
----9/27/2006 8:30:32 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled GetCheckOutListChanges returned: Success
----9/27/2006 8:30:32 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled GetUserEmailOptions returned Success
----9/27/2006 8:30:32 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled ListWatchers returned Success
----9/27/2006 8:30:32 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled ListCloakedObjects returned: Success
----9/27/2006 8:30:32 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled GetRepositoryOptions returned: Success
----9/27/2006 8:30:32 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled GetRepositories returned: Success
----9/27/2006 8:30:52 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled BeginTx beginning transaction
----9/27/2006 8:30:58 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled BeginTx returned: Success
----9/27/2006 8:30:58 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled VaultLib.VaultRequestCopyBranch returned: Success
----9/27/2006 8:30:58 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled Ending transaction
----9/27/2006 8:36:21 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled A severe error occurred on the current command. The results, if any, should be discarded.
----9/27/2006 8:36:21 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled Could not save folder entries: Error in the application.
----9/27/2006 8:36:42 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
----9/27/2006 8:36:42 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled VaultLib.VaultResponseItem returned: Success
----9/27/2006 8:36:42 AM ereddell--EREDDELL2(192.168.0.159)--SSL Disabled EndTxFailDBInsert

We have 30 licensed Vault users, and as you can imagine not being able to branch is a severe problem. Worse, once someone attempts to branch no one can commit anything to vault forcing me to restart the service. However, restarting the service does not solve the branching problem.

Any help that you may provide will be much appreciated.

thanks,
Earl

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Wed Sep 27, 2006 9:35 am

It looks like the operation may be timing out.

Does branching fail on any folder or just large folders?

What version of SQL Server are you using?
Linda Bauer
SourceGear
Technical Support Manager

ereddell
Posts: 10
Joined: Wed Sep 27, 2006 8:13 am

Post by ereddell » Wed Sep 27, 2006 9:48 am

Hi Linda,

Thank you for the quick response. We are using MS SQL 2000 server. I considered the timeout possibility but I thought better of it since the server log indicated a failure prior to the time out log. So I assummed there was an error first then the timeout.

You are correct that smaller folders appear to branch fine. It is the larger folders that do not. How do you recommend setting the timeout?

Thanks again for your prompt response,
Earl

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Wed Sep 27, 2006 10:03 am

Try changing the SQL time out in the Vault.config file in the Vault Service Directory on the server machine. Look for this line:
<SqlCommandTimeout>360</SqlCommandTimeout>

The default is 360 seconds, or 6 minutes. Change it to something larger, like 720 or even 7200.
Linda Bauer
SourceGear
Technical Support Manager

ereddell
Posts: 10
Joined: Wed Sep 27, 2006 8:13 am

Post by ereddell » Wed Sep 27, 2006 11:31 am

Thanks again Linda for the help. I have done as you asked and changed the timeout to 7200 but the error is still happening. It occurs within 10 or 11 minutes.

thanks,
Earl

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Wed Sep 27, 2006 12:00 pm

Have you restarted IIS? (iisreset, from the command line). This will cause Vault to read the config file.
Linda Bauer
SourceGear
Technical Support Manager

ereddell
Posts: 10
Joined: Wed Sep 27, 2006 8:13 am

Post by ereddell » Wed Sep 27, 2006 12:34 pm

Yes I have. I used iisreset /stop and iisreset /start to no avail.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Wed Sep 27, 2006 1:26 pm

There's another place we can adjust the timeout.

Open the web.config file in the VaultService directory and look for the connection string information. Add a connection timeout : ;Connect Timeout=120

Example:
<add key="ConnectString" value="Application Name='SourceGear Vault Server'; Connection Reset='true'; Connect Timeout=120; Server=(local); Database=sgvault; Integrated Security='true'" />
Linda Bauer
SourceGear
Technical Support Manager

ereddell
Posts: 10
Joined: Wed Sep 27, 2006 8:13 am

Post by ereddell » Wed Sep 27, 2006 1:47 pm

Thanks again for all of your help, but unfortunately that doesn't seem to work either.

ereddell
Posts: 10
Joined: Wed Sep 27, 2006 8:13 am

Post by ereddell » Thu Sep 28, 2006 9:09 am

Linda,

I really appreciate the help you have given me and with such quick responses.

Is there anything else we can try? Would upgrading to 3.1.9 solve this issue? Are there any files I can send you etc that could help diagnosis this problem?

thanks,
Earl

ereddell
Posts: 10
Joined: Wed Sep 27, 2006 8:13 am

Post by ereddell » Thu Sep 28, 2006 12:19 pm

Nevermind Linda,

I had our DBA take a look at the sgVault database. He ran some integrity checks and rebuilt the indexes. Now everything seems to be working fine.

thanks,
Earl

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Thu Sep 28, 2006 12:32 pm

That's good news. Thanks for the update. :D
Linda Bauer
SourceGear
Technical Support Manager

Post Reply