Red Gate forums :: View topic - too many connections, slow for remote users
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Source Control 2
SQL Source Control 2 forum

too many connections, slow for remote users

Search in SQL Source Control 2 forum
Post new topic   Reply to topic
Jump to:  
Author Message
vincentj



Joined: 17 Feb 2011
Posts: 36

PostPosted: Fri Sep 02, 2011 11:40 pm    Post subject: too many connections, slow for remote users Reply with quote

When linking a database to the repository, SQL Source Control is opening hundreds of TCP connections. I monitored it using TCP View, and during the linking process it opened over 1700 new connections (the green lines are new connections in the last 5 seconds):



This is causing major problems for our remote users, because our VPN limits the number of simultaneous connections as part of its threat management (to prevent DoS attacks). The result is that a database that takes 3 minutes to link inside the office takes 3 hours or more (!!) when connected through the VPN.

Is there anything we can do about this? Thanks.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6587

PostPosted: Mon Sep 05, 2011 9:55 am    Post subject: Reply with quote

This doesn't sound like the design of SQL Source Control to me. Actually it doesn't make any connections to the network as far as I can recall except maybe for licensing and check for updates -- it's just invokes the source control system (TFS, etc) to request and update files.

If you do netstat -a -b from a command-line, can these sockets be directly associated with ssms.exe?
Back to top
View user's profile Send private message
vincentj



Joined: 17 Feb 2011
Posts: 36

PostPosted: Tue Sep 06, 2011 4:04 am    Post subject: Reply with quote

Ah, looking at this more closely has made me notice something.

I ran TCPView and netstat together to compare the results. I saw that one particular port was reported as belonging to SSMS by netstat, but was showing up as a [System Process] according to TCPView.

What's happening is that the port for SSMS is continuously incrementing. When it changes from e.g. 50000 to 50001, then port 50000 gets changed to a [System Process] with the state TIME_WAIT. If I turn the update speed to 1 second, sometimes I see a new port open up for SSMS with the status SYN_SENT which quickly changes to ESTABLISHED. The old port goes from ESTABLISHED to FIN_WAIT1 briefly before changing to TIME_WAIT under [System Process].

All of these connections are to our Subversion server, by the way.

Is it constantly opening and closing connections? (Sorry, I'm not a network guy, I don't know how to interpret this data.)
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6587

PostPosted: Tue Sep 06, 2011 9:30 am    Post subject: Reply with quote

Is there anything in the help for TCPView?
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6587

PostPosted: Wed Sep 07, 2011 11:56 am    Post subject: Reply with quote

Apparently TIME_WAIT connections can be sockets that are closed, but waiting around a few extra seconds to ensure they've got all of the data. I'd say this is pretty typical for HTTP 1.0 web servers, if that's the agreed protocol then you can minimize connections by configuring the client and server to use HTTP 1.1 rather than 1.0.

If the server uses HTTP 1.0, then a dedicated connection is used for each HTTP request. With 1.1, connections are re-used for multiple requests. I would assume in this day and age, though, that all HTTP web servers are using 1.1.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group