Results 1 to 2 of 2

Thread: Mysql dies with “too many connections”

  1. #1
    joerace is offline Junior Member
    Join Date
    Jun 2006
    Posts
    2

    Default Mysql dies with “too many connections”

    After installing sugarcrm mysql started dieing, the daemon was still running but it was no longer accepting requests. After i kill off the daemon and restart, mysql starts accepting connections for about 10 minutes then it dies and states too many connections. I do a show processlist and as you can see below every connection starts a new thread and does not let it go causing mysql to die. so what it seem like is somewhere sugar is not closing the connections, starting a new thread, and eventually killing mysql. Have you seen this issue before and if so is there a fix? is it a configuration issue?

    | 5845 | sugar | localhost | sugarcrm | Sleep | 314 | | NULL |
    | 5846 | sugar | localhost | sugarcrm | Sleep | 258 | | NULL |
    | 5847 | sugar | localhost | sugarcrm | Sleep | 242 | | NULL |
    | 5848 | sugar | localhost | sugarcrm | Sleep | 250 | | NULL |
    | 5849 | sugar | localhost | sugarcrm | Sleep | 246 | | NULL |
    | 5850 | sugar | localhost | sugarcrm | Sleep | 243 | | NULL |
    | 5851 | sugar | localhost | sugarcrm | Sleep | 235 | | NULL |
    | 5852 | sugar | localhost | sugarcrm | Sleep | 237 | | NULL |
    | 5853 | sugar | localhost | sugarcrm | Sleep | 234 | | NULL

    sugar suite 4.2
    mysql 5.0.22
    freebsd 6.0
    PHP 5.1.2
    apache 2.2.0

  2. #2
    joerace is offline Junior Member
    Join Date
    Jun 2006
    Posts
    2

    Default Re: Mysql dies with “too many connections”

    Well i figured it out, mysql has a default setting of wait_timeout=28800 which is 8 hours a connection can stay open, so using sugar crm opens a lot of connections and eventually kills off the daemon. though mysql will restart the daemon eventually in the meantime most of your web sites will be down waiting to establish a new connection. so to fix the issue set the wait_timeout =60 so every 60 seconds mysql will kill off the connection and become a happy server again. note: that change is made to your /etc/my.cnf file.

    [mysqld]
    wait_timeout=60
    interactive_timeout=120

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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