Hi
We have developed an intranet site using Drupal 4.7.0 and using since last couple of years.Now many people are using it. But from last 3 to 4 month we have been getting error from mysql stating "Too many connection" during peak hour.Only solution to bring site up is to restart the mysql server.We have investigated to find out the root cause and thought it might be memory problem.But what we are observing that there is enough memory but still we are getting error.
So i just want to know how exactly drupal handles the mysql connections because i did not see any code which close the connection after serving the page.Does it close the connection after serving the page or does it rely on mysql to handle it? Does it close the connection when script get terminated during the serving the page because of any reason?

here are some information about our application:
OS : Linux red hat
Apache 2.0.53
PHP: 4.3.9
RAM : 4GB
Concurrent user : 15 to 20.

Please guide us how to avoid such error in future.

Comments

stevenpatz’s picture

Category: bug » support
Priority: Critical » Normal
kbahey’s picture

Start with checking what is the value of MaxClients in Apache's configuration, as well as max_connections in MySQL's configuration.

Match them so that the latter is less than the former, or increase them both to handle the peak load.

pasqualle’s picture

Status: Active » Closed (won't fix)

This version is not supported. Reopen or create a new issue if the problem exists in any recent version (version equal or above Drupal 5)