The real issue with PHP is that it has no connection pooling to Database. It just open and closes the connection each time a user request a page. When a PHP file finishes executing, all it's state are killed and hence PHP is unable to do connection pooling.
However, one can use mysql_pconnect, in that case connections doesn't get closed after the page had executed, that way they get reused in the next request. But this isn't the same as connection pooling as you cannot mention how many connections to be kept open.
You can use some third party extension for Connection Pooling:
1. SQL Relay is a persistent database connection pooling, proxying and load balancing system for Unix and Linux.
2. Apache DBD API : mod_dbd module
3. pgpool For PostgreSQL on Linux only.
- Kiran's blog
- 745 reads













Post new comment