title: php postgresql persistent connections always close
body: <p>I have an Apache/PHP app on one server and a PostgreSQL database on a second server. They are configured to connect via SSL. Everything works, except that even though <code>$db-&gt;setAttribute(PDO::ATTR_PERSISTENT, true);</code> is in the script the TCP connections are always closed. PHP.INI has <code>pgsql.allow_persistent = On</code> <code>pgsql.auto_reset_persistent = Off</code> <code>pgsql.max_persistent = 30</code> and <code>pgsql.max_links = 30</code>. Using <code>sudo netstat -nap</code> I can see that there are no ESTABLISHED connections between the two servers. What else do I need to do to keep the connections open? New connection overhead is 10-12 ms per request.</p>