News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Lukas Smith's Blog:
Persistent connections with MSSQL
December 11, 2008 @ 12:01:26

Lukas Smith is looking for a little help on a strange problem he's seeing connecting to a SQL Server with persistent connections:

We are connecting to SQL Server via mssql_pconnect(). MaxChilds is set to 256 and we are only establishing one connection per request. So as a result I am expecting a maximum of 256 established connections. A client went into production yesterday and due to a missing index the server ended up being insanely loaded, as the queries started to block each other. The sysadmin checked the state of things via netstat and found that there were close to 500 tcp connections to the SQL Server. What gives?

He checked FreeTDS and the MaxRequestsPerChild settings to ensure that nothing there could have caused the problem, but hasn't found any hints so far. If he can't solve it right away, he also wonders if there's a way to kill idle connections if they're not used in a certain amount of time.

There's already one connect that mentions a similar issue but with Oracle connections, also on RHEL, but no definitive answers so far.

1 comment voice your opinion now!
persistent connection mssql mssqlpconnect tcp problem freetds


blog comments powered by Disqus

Similar Posts

Nick Halstead's Blog: Do faster typists make better coders?

Gonzalo Ayuso: Handling several PDO Database connections in Symfony2 through the DIC in PHP

Sean Coates' Blog: Actually Solving a Problem (believe it or not)

Eirik Hoem's Blog: Array problems with SOAP and PHP - Updated

Brandon Savage: Publishing messages to RabbitMQ with PHP


Community Events











Don't see your event here?
Let us know!


release language hhvm database hack project security application composer performance install introduction framework unittest package podcast component facebook symfony2 example

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework