Results 1 to 5 of 5

Thread: Too Many Connections

  1. #1
    Join Date
    Jun 2005
    Location
    Unionville, CT
    Posts
    3

    Too Many Connections

    Our server has been running very slow, and I noticed the connections are peaking. It appears that connections are staying open, which is causing big problems. When I look at the connections list, there are pages of them that look like this:

    58920 localhost:59857 None Sleep 14376 --- ---
    58923 localhost:59863 None Sleep 14375 --- ---
    58926 localhost:59869 None Sleep 14373 --- ---

    Is there a way to get MySQL to close it's connections and bring our server back to life? I tried increasing Max Connections, but it simply peaks at the higher number.

    Thanks,
    Carl

  2. #2
    Join Date
    Feb 2003
    Posts
    1,048
    How are the connections being created? Programmatically via some program/script or users connecting manually or what?

    What OS are you using? FreeBSD Linux has a known issue with connection timeouts.

    From http://dev.mysql.com/doc/mysql/en/freebsd.html:
    Known problem when using LinuxThreads on FreeBSD is:

    The connection times (wait_timeout, interactive_timeout and net_read_timeout) values are not honored. The symptom is that persistent connections can hang for a very long time without getting closed down and that a 'kill' for a thread will not take affect until the thread does it a new command

    This is probably a signal handling problem in the thread library where the signal doesn't break a pending read. This is supposed to be fixed in FreeBSD 5.0
    What is your connection timeout set to?

  3. #3
    Join Date
    Jun 2005
    Location
    Unionville, CT
    Posts
    3
    Thanks for the reply. I'm not sure how the connections are being created, which is a big part of the problem. My suspicion is that our message boards have something to do with it, so I took them offline to see if everything works without them, and so far it does.

    I also changed the wait_timeout to 50, which I hope isn't going to wreak havok somewhere.

    We're on an Xserve running Mac OSX (10.8).

  4. #4
    Join Date
    Feb 2003
    Posts
    1,048
    In what language is the board written? My first guess is that the code is creating connections over and over and not destroying them so they just hang around even after the user is long gone.

  5. #5
    Join Date
    Jun 2005
    Location
    Unionville, CT
    Posts
    3
    They're UBB boards (v6.2.2) written in PHP. What's troubling about these boards is that the users table gets overheaded and crashes more often than it should. We're working on a move to Fusion BB, which will hopefully solve the problems, but I'm still not sure if there's a problem with our MySQL install.

Posting Permissions

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