SO_LINGER & setsockopt

From: Date: Thu, 24 Feb 2000 14:20:50 +0000
Subject: SO_LINGER & setsockopt
Groups: php.version4 
Request: Send a blank email to php-version4+get-10840@lists.php.net to get a copy of this message
Hi All! After posting a similar message elsewhere, I was informed that I should be posting it here. So, here it is. Apparently, PHP4 does not have a method to call the setsockopt() call that exists in C. This presents a small problem for me, and a few others I would assume. I have an application, that waits for connections from PHP4. This application accepts the input from Apache/PHP4 processes and, after some preliminary error checking, parses this input into a series of commands and injects them into another application. There is a problem that arises due to sockets ( the ones that PHP4 opened ) being in the FIN_WAIT/TIME_WAIT states for too long after they are closed. In order to service a high volume of requests, the SO_LINGER option needs to be set on the socket. This, of course, can only be done by the process which opened the socket, being Apache/PHP4. Not being able to call SETSOCKOPT() as is possible in C, at least in our application anyway, means that although PHP4 is great and perfect and desirable ( etc....) we simply cannot use it to support a high volume of users do to the sockets that PHP4 opened being stuck in FIN_WAIT/TIME_WAIT for too long after closing them. If any of the developers of PHP4 have an extra 30 minutes, is there anyway that you could add SETSOCKOPT() and/or SO_LINGER option functionality? mike mike@vtracks.com

« previous php.version4 (#10840) next »