MySQL Persistent Connections

Ian picture Ian · Feb 12, 2010 · Viewed 8.3k times · Source

I have 10 application servers and 1 mysql database. I would like to do connection pooling for mysql, but simply enabling mysql_pconnect() will not work since it'll cause some servers to have more connections than others.

What's the best solution for this scenario..?

Answer

MarkR picture MarkR · Feb 12, 2010

Why do you want to use persistent connections?

They are likely to cause trouble and will not improve performance noticeably (in all likelihood).

Run some performance tests on production-grade hardware in your lab, and you'll see.