Web lists-archives.com

[PHP] TCP Keepalive on memcache/oci8




Hi,

When I use PHP (mod_php) with a firewall between PHP and a memcached server (or an oracle) it seems that there is no keepalive.

So when the firewall reach the TCP Idle timeout, it close the connection.
With memcache, PHP seem to be able to recover is connexion after some (long) seconds But with oci8, PHP hangs for an unlimited time, you can no more stop apache without hard killing it

# memcache :

tcp 0 0 10.0.1.1:57705 10.0.2.2:9600 ESTABLISHED off (0.00/0/0) tcp 0 0 10.0.1.1:57696 10.0.2.2:9600 ESTABLISHED off (0.00/0/0) tcp 0 0 10.0.1.1:57708 10.0.2.2:9600 ESTABLISHED off (0.00/0/0)

# oracle

tcp 0 0 10.0.1.1:36353 10.0.2.1:1521 ESTABLISHED off (0.00/0/0) tcp 0 0 10.0.1.1:36342 10.0.2.1:1521 ESTABLISHED off (0.00/0/0) tcp 0 0 10.0.1.1:36350 10.0.2.1:1521 ESTABLISHED off (0.00/0/0)

Any one already have this issue ? (Keepalive have been already tune after reading http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/usingkeepalive.html)

(Debug was done on a PHP 5.4.16 latest CentOS7 package)

Best regards,


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php