Link to home
Create AccountLog in
Avatar of hiraben
hiraben

asked on

SSL connection to SQL Server on Internet times out

I am connecting to Microsoft SQL Server 2008 on a Godaddy dedicated server running Windows 2008. The client is connecting using an ODBC data source with TCP/IP using SSL. The connection drops within 30 seconds of the last query. As long as a query is run before 30 seconds is over, the connection stays alive. If I change the ODBC connection to unencrypted, there is no problem with timeouts. If I run the client software on the server, there is no problem with dropping the SSL connection even though I have set the server to be the external web address of the server. Any help would be appreciated.
Avatar of Sander Stad
Sander Stad
Flag of Netherlands image

Maybe the SSL hashing makes the time needed to return the values with ODBC too large.

Can you try the following:
http://msdn.microsoft.com/en-us/library/ms709288(v=vs.85).aspx
Avatar of hiraben
hiraben

ASKER

The connection pooling timeout was 60 seconds. I tried setting it to 7,200,000, but it still timed out. It seems to happen right at 30 seconds, so it seems like there should be a setting somewhere, but I can't find it. And it's peculiar that it only happens when connecting with SSL. Any other idease would be greatly appreciated.
Is there a firewall or load balancer somewhere between you and the SQL server that is timing out connections?
Avatar of hiraben

ASKER

I don't think so. I am using GoDaddy's dedicated hosting, and I don't think there is any load balancing set up. Plus it's only the SSL connections that are timing out.
Try adding "Connection Lifetime=0" to your connection string in the data source. Zero is the maximum lifetime, or you can specify a value in seconds.
Avatar of hiraben

ASKER

I have that set to 0 already. I'm not sure that would address why non-encrypted connection work and encrypted ones do, but how do I tell whether the setting is being picked up correctly?
Avatar of hiraben

ASKER

Sorry, typo. Non-SSL connections work, SSL ones do NOT work.
ASKER CERTIFIED SOLUTION
Avatar of bgoering
bgoering
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Glad you got it going
Avatar of hiraben

ASKER

After changing many settings in many places, turns out the 30 seconds isn't actually visible anywhere, but setting the IPSec settings to Advanced gets rid of it.