SQL Server does not exist or access denied.

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

Moderator: SourceGear

Tom.Wells
Posts: 65
Joined: Tue Sep 21, 2004 10:35 am

SQL Server does not exist or access denied.

Post by Tom.Wells » Wed Nov 30, 2005 1:52 pm

We are occasionally not able to get into Vault because the Vault server cannot connect to SQL Server. After a period of time it just mysteriously starts working. Here is a section of the log where the error starts:

Login
----11/30/2005 11:11:39 AM tstrum--of08610.dot.int.lan(172.28.28.105)--SSL Disabled
General network error. Check your network documentation.
----11/30/2005 11:11:39 AM tstrum--of08610.dot.int.lan(172.28.28.105)--SSL Disabled
GetRepositoryStructure returned: FailPermissionDenied
----11/30/2005 11:12:25 AM dingham--hlt08235.dot.int.lan(172.28.4.62)--SSL Disabled
Vault Failed to establish a connection to the database.
----11/30/2005 11:12:25 AM dingham--hlt08235.dot.int.lan(172.28.4.62)--SSL Disabled
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
----11/30/2005 11:12:25 AM dingham--hlt08235.dot.int.lan(172.28.4.62)--SSL Disabled
FailDBConn

After this some of the timeout messages repeat but most of the entries look like this one:

FailDBConn
----11/30/2005 12:47:34 PM admin--ats09127.dot.int.lan(172.28.124.136)--SSL Disabled
Vault Failed to establish a connection to the database.
----11/30/2005 12:47:34 PM admin--ats09127.dot.int.lan(172.28.124.136)--SSL Disabled
SQL Server does not exist or access denied.

During the outage we are able to connect to the SQL Server instance and are able to retrieve data from it. However this was not done from the Vault server. We didn't try it from there. The SQL Server logs do not show any problems.

Do you have any ideas about what's going on?

Thanks

Tom

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Nov 30, 2005 2:54 pm

How many users are using the server? It looks as if you're using more than 100 concurrent connections to the database.

In any case, this number can be controlled by the database's connection string with 'Max Pool Size' in Vault's web.config

Ex - <add key="ConnectString" value="Application Name='SourceGear Vault Server'; Connection Reset='true'; Server=(local); Database=sgvault; Max Pool Size=175; Integrated Security='true'" />
Jeff Clausius
SourceGear

Tom.Wells
Posts: 65
Joined: Tue Sep 21, 2004 10:35 am

Post by Tom.Wells » Wed Nov 30, 2005 3:37 pm

We have 75 licences. I can't imagine more than 20 concurrent but I haven't monitored it. I looked at our web.config and our Connection Reset='false'. Would that have an affect? We are also not using integrated security.

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Nov 30, 2005 3:47 pm

No, my post was an example. The Max Pool Size is what is most important.

I didn't see it in the post. What version of Vault are you running?
Jeff Clausius
SourceGear

Tom.Wells
Posts: 65
Joined: Tue Sep 21, 2004 10:35 am

Post by Tom.Wells » Wed Nov 30, 2005 3:49 pm

2.0.6 (2219)

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Nov 30, 2005 3:53 pm

I see.

The connection string properties changed in Vault 3.x. In your case, Max Pool Size is the most important issue.

You could try the different ConnectionReset setting, but I would only recommend changing one thing at a time.
Jeff Clausius
SourceGear

Tom.Wells
Posts: 65
Joined: Tue Sep 21, 2004 10:35 am

Post by Tom.Wells » Wed Nov 30, 2005 3:54 pm

Thanks. We'll give them a try.

Tom.Wells
Posts: 65
Joined: Tue Sep 21, 2004 10:35 am

Post by Tom.Wells » Thu Dec 01, 2005 8:59 am

Sorry for being a n00b, but I assume to implement this I make the change to web.config then restart something. What?

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Thu Dec 01, 2005 9:02 am

Tom:

Yes, just add the text to the connection string in web.config. You can use my example as a starting point. Also, I'd suggest making a backup of the file just in case.

Anyway, once you made your changes, save the file. Nothing else is required. IIS will take care of restarting the Vault server.
Jeff Clausius
SourceGear

Tom.Wells
Posts: 65
Joined: Tue Sep 21, 2004 10:35 am

Post by Tom.Wells » Thu Dec 08, 2005 12:23 pm

Follow-up. We are continuing to experience the problem but have determined that it is not Vault related. When the outage occurs it is not possible to ping the SQL Server from the IIS box that Vault is running on.

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Thu Dec 08, 2005 12:27 pm

Is the Vault Server / SQL Server on the same network / subnet? We could try to use a different protocol to connect to SQL Server.

Post back if you need any other assistance.
Jeff Clausius
SourceGear

Tom.Wells
Posts: 65
Joined: Tue Sep 21, 2004 10:35 am

Post by Tom.Wells » Thu Dec 08, 2005 12:35 pm

Yes they are on the same subnet. Their IP address are identical except for the last number set. As in

xxx.xxx.xxx.212
xxx.xxx.xxx.93

They have mysteriously started working again without intervention. Our network techs are looking into it.

Tom.Wells
Posts: 65
Joined: Tue Sep 21, 2004 10:35 am

Post by Tom.Wells » Thu Feb 09, 2006 8:18 am

We are continuing to experience intermittant outages. Today other programs can establish a connection to SQL Server from the Vault web server but Vault cannot. It was working yesterday. We had an outage in our SQL Server during the night. Other programs have recovered but Vault stays unavailable for minutes to hours after the SQL Server is restored. The first time you ask to connect it takes a long time. After that the response is immediate. Does the service check once and then return the same result without checking each time? We are on 2.0.6.

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Thu Feb 09, 2006 8:27 am

There is a bug in the .Net framework in relation to connection pools. In essence, if at any time your SQL Server goes down while the Vault server has a valid connection in the database connection pool, you must restart the Vault server.

There are no work arounds, as the .Net Framework reports the database connections in the pool are still good, and there is no way to remove a connection from the pool in the 1.1 .Net Framework. The only option is to force a restart of the Vault server.
Jeff Clausius
SourceGear

Tom.Wells
Posts: 65
Joined: Tue Sep 21, 2004 10:35 am

Post by Tom.Wells » Thu Feb 09, 2006 8:30 am

OK. How do we force the Vault service to restart? Why does it start working on its own after a period of time? Will upgrading to the latest version of Vault get us to the 2.0 framework and solve the problem?

Post Reply