Using httpd 2.2 on CentOS 6, I'm trying to setup a handful of forward proxies using mod_proxy/ProxyPass, several of which should reuse connection pooling for a limited time (15 seconds, in my case) and then close the connection. I need to close the pooled connection because the backend will drop idle connections after 5 minutes.
I'm also using prefork and I don't know if this is effecting the ttl behavior or not.
<IfModule prefork.c> StartServers 5 MinSpareServers 5 MaxSpareServers 10 ServerLimit 128 MaxClients 128 MaxRequestsPerChild 10000 </IfModule> ... ProxyPass /url1 https://internal1.example.com ttl=15 ProxyPass /url2 https://internal2.example.com ttl=15 ProxyPass /url3 https://internal3.example.com
What I'm seeing is each worker process still has an idle established connection (confirmed idle via tcpdump) to the backend until 5 minutes later when the backend sends a reset. If I use the proxy again within the 5 minutes, but far after the ttl=15 has expired, the workers reuse their connections/ports (confirmed httpd debug logging not creating a new ssl connection).
Googling around, some other people have seen similar behavior: