Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002

    Unanswered: Too Many Connections

    Any thoughts on the problems I am encountering?

    I'm running Plesk for my users to set up their MySQL databases. Recently, have been getting a bunch of errors resulting from:

    "Warning: Too many connections"

    The system admin upped the number of connections avail on the server but wondering if there was a better method to handle this problem in the future? Or is it just bad MySQL coding? I see increasing the connection limit as a temporary solution.

    One of the problems could be that our users are not using persistent connections to the database. We could tell all our users to use the ‘pconnect’ function because it recycles open connections and implicitly closes unused connections. If they use ‘connect’ MySQL will not automatically close the connection unless the user explicitly closes the connection in their code. The more connections open the more memory the servers uses. The domino effect will slow everything down on the server.

    Any suggestions on alternative solutions??

    Thanks in advance!

  2. #2
    Join Date
    May 2002
    I prefer not to use pconnect.

    Every database connect should be implicit, just like the disconnect. you should tell this to your developers/db users.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts