tags:

views:

19

answers:

1

I have a PHP application that uses the ODBC functions for database access. My DBA recently discovered that the application is not closings its database connections, resulting in numerous invalid connections that are in a TIME_WAIT state.

We have checked the code and I am doing an odbc_close_all call in every script, plus even if I wasn't then the connection should close at the end of the script anyway. There are no long running scripts holding on to their connections

Has anyone seen anything like this or have any idea what the issue might be?

PHP version is 5.1.4 Running on Windows Server 2003 R2 Service Pack 2 MySQL database

A: 

After much research, we stumbled upon several sources that inidcated that he issue was TcpTimedWaitDelay (thanks VolkerK for the tip). This has helped a good deal, but we are still seeing about 30-40 connections in the TIME_WAIT state at any given time.

We are wondering now if anyone has any advice as to whether this behavior is normal for a Windows Server and if this is as good as it gets, or if there are other avenues worth researching.

Thanks

wshato