SV: [PHP-WIN] mssql tcp
| From: | Joakim Ling | Date: | Tue, 15 Nov 2005 13:48:06 +0000 |
| Subject: | SV: [PHP-WIN] mssql tcp | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-26484@lists.php.net to get a copy of this message | ||
It doesn't matter, the problem lies within php. To solve this problem you have to use a client
that usage pooling like ODBC -> MSSQL. So my next step is to rewrite all mssql code to ODBC.
This is not a problem if you run a small mssql server, buy if you have over 100 databases with a lot
of activity windows starts to act really strange because of a bug in php. (read more in Zend forum)
But who works with php and mssql? :-) (except me)
//Jocke
-----Ursprungligt meddelande-----
Från: Robert Twitty [mailto:rtwitty@neutron.ushmm.org]
Skickat: den 15 november 2005 14:20
Till: Joakim Ling
Kopia: php windows
Ämne: Re: [PHP-WIN] mssql tcp
Are you using mssql_pconnect() to connect to the database?
-- bob
On Mon, 14 Nov 2005, Joakim Ling wrote:
> Hi
>
>
>
> When I connect to my MSSQL server (internal) with mssql_connect, make a
> few queries etc and then close the connection link. It creates a TCP
> connection each time (for every query). I'm running Win 2003 STD, IIS6,
> PHP5, MSSQL2000. The problem is that the connection doesn't close
> correctly so after a few minutes I will have a lot of TCP connections
> that looks like this:
>
>
>
> (With "netstat -ap tcp")
>
> TCP w1new:22953 w1new:ms-sql-s TIME_WAIT
>
> TCP w1new:22954 w1new:ms-sql-s TIME_WAIT
>
> TCP w1new:22955 w1new:ms-sql-s TIME_WAIT
>
> TCP w1new:22956 w1new:ms-sql-s TIME_WAIT
>
> TCP w1new:22957 w1new:ms-sql-s TIME_WAIT
>
> TCP w1new:22958 w1new:ms-sql-s TIME_WAIT
>
> TCP w1new:22959 w1new:ms-sql-s TIME_WAIT
>
> TCP w1new:22960 w1new:ms-sql-s TIME_WAIT
>
> TCP w1new:22961 w1new:ms-sql-s TIME_WAIT
>
> TCP w1new:22962 w1new:ms-sql-s TIME_WAIT
>
> TCP w1new:22963 w1new:ms-sql-s TIME_WAIT
>
> TCP w1new:22964 w1new:ms-sql-s TIME_WAIT
>
> TCP w1new:22965 w1new:ms-sql-s TIME_WAIT
>
>
>
> After rebooting and running a few minutes the list is full and Windows
> begins to act really strange, not so strange when mssql has more then
> 10000 TIME_WAIT connections waiting to close, but how to close them????
> mssql_close(); has no effect to this problem.
>
>
>
> I changed the TCPTimeWaitDelay value to 30 in regedit to increase
> connections, but still a huge problem. Anyone experience this before or
> knows if converting to ODBC would work better?
>
>
>
>
>
> Best regards
>
> Joakim Ling
>
>