Curious Developer
2010-01-06 23:03:23 UTC
- Apache 2.x
- PHP 5.2.x
- Mysql 5.x
We are not using persistent mysql connections. We have a lot of unclosed connections in our script and also have a few unnecessary mysql_connects. Does that matter? What could be a permanent fix to the problem.
- Increasing the max number of allowed connections?
- If it is on a shared server, checking the max number of connections per user and reducing that if it is more? But won't that affect users of my site also because all will be using the same db connection params?
-
Also please answer this questions of mine also :-
1. I know that php automatically closes all the existing connections at the end of a script execution and mysql terminates all idle connections after some timeout. If php itself closes then Mysql need not close in this case or some connections survive php termination ?