Anyone know how to solve this?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • -=HOAX=-
    Confirmed User
    • Dec 2001
    • 4365

    #1

    Anyone know how to solve this?

    Warning: Too many connections in mysqlfunc.inc.php on line 4

    Warning: MySQL Connection Failed: Too many connections in mysqlfunc.inc.php on line 4
    Chould not connect to MySQL
    Insert Value Here.
  • Amputate Your Head
    There can be only one
    • Aug 2001
    • 39075

    #2
    hmmm..... I have seen this before....

    but no, I don't know how to fix it.
    SIG TOO BIG

    Comment

    • -=HOAX=-
      Confirmed User
      • Dec 2001
      • 4365

      #3
      I've tried multiple variations in the my.cnf file but mysqld is pegging the processor at 95%+ then again the 80k+ on a dual p450 with 256megs of ram could be the problem...


      I know mysql is not necessarily the best db to be running but its kinda industry standard...

      Anybody know what type of traffic I should be able to push through that system?
      Insert Value Here.

      Comment

      • -=HOAX=-
        Confirmed User
        • Dec 2001
        • 4365

        #4
        C'mon...help GFY maintain its one useful thread a day quota!
        Insert Value Here.

        Comment

        • DjSap
          Confirmed User
          • Jul 2002
          • 3869

          #5
          well copy and paste line 4 otherwise its kinda hard...
          Blog Themes, TGP Design, Writing Services, Grunt Work
          ICQ: 66871495

          Comment

          • pipp
            Confirmed User
            • Oct 2001
            • 1185

            #6
            Switch to postresql handles complexity much bether then mysql. What kind off querys are you running that are causing this ?

            Comment

            • JFPdude
              Confirmed User
              • Jan 2002
              • 4027

              #7
              First how many concurrent connections does your mysql server allow ... I'm guessing this needs to be raised

              second check the database for corruption .. that will also cause the error.


              Need to see the line to be for sure but I would start at those 2 places.

              Comment

              • Sysyphus
                So Fucking Banned
                • May 2002
                • 11

                #8
                Put this:

                set-variable = max_connections = some number

                in your /etc/my.cnf file. Where some number = 1000 or 2000 or 3000, etc... See what works. Consider checking in your operating systems share/mysql directory (/usr/share/mysql, /usr/local/share/mysql) and look at the different sample configs you can use as your /etc/my.cnf. More memory usage = less disk usage = happy MySQL (In most cases anyway)

                You'll have to restart MySQL for the changes to take effect.



                Apparently the board didn't like my choice in braces...

                Comment

                • FierceHost
                  Confirmed User
                  • Apr 2002
                  • 424

                  #9
                  login your shell and do a "free" command, post the 2nd line of what you see. This will tell you if its your ram, or not. also do a uptime command and post them results. you prob need to change your concurrent con variable. if your server load is too much, then you can't the only thing you can do is get a better server.
                  250$ 1000GB / Mo - 2000mb space - 10 domains - .26 per gig overage
                  <font color="#00FF00">ICQ 132871574</font>

                  Comment

                  • vending_machine
                    Confirmed User
                    • Jun 2002
                    • 1070

                    #10
                    Originally posted by FierceHost
                    login your shell and do a "free" command, post the 2nd line of what you see. This will tell you if its your ram, or not. also do a uptime command and post them results. you prob need to change your concurrent con variable. if your server load is too much, then you can't the only thing you can do is get a better server.
                    The free command only works on select systems, FYI...

                    Comment

                    • vending_machine
                      Confirmed User
                      • Jun 2002
                      • 1070

                      #11
                      Originally posted by pipp
                      Switch to postresql handles complexity much bether then mysql. What kind off querys are you running that are causing this ?
                      postgresql can handle more complex queries, yes, but it is by no means faster. It's not even half as fast as mysql.

                      Comment

                      • vending_machine
                        Confirmed User
                        • Jun 2002
                        • 1070

                        #12
                        Originally posted by -=HOAX=-
                        Warning: Too many connections in mysqlfunc.inc.php on line 4

                        Warning: MySQL Connection Failed: Too many connections in mysqlfunc.inc.php on line 4
                        Chould not connect to MySQL
                        Are you using persistent connections? How many connections are open at the time when it fails?

                        If your queries aren't streamlined and optimized, upping the number of max connections isn't going to help you.

                        Comment

                        • -=HOAX=-
                          Confirmed User
                          • Dec 2001
                          • 4365

                          #13
                          I'm using the defualt my.cnf specified in /usr/local/share/mysql/my-medium.cnf

                          As far as I see there is not set limit of max allow connections...I see max packet size.. but that's it...this is pretty much the default config and install of mysql...I'm using agp sql and epowertrader...switching is not an option its been done...its what I have to work with...

                          I'm concerned because I have two other boxes running same setups and the traffic to them is increasing...one is currently at about 16,000 unq's a day...and growing fast...but it seems much calmer.

                          A top command shows mysql using about 3-6% of the cpu on average...
                          Insert Value Here.

                          Comment

                          • -=HOAX=-
                            Confirmed User
                            • Dec 2001
                            • 4365

                            #14
                            And the free command is not used in freebsd btw.
                            Insert Value Here.

                            Comment

                            • SetTheWorldonFire
                              Confirmed User
                              • Feb 2002
                              • 7444

                              #15
                              You can have about 100 connections, I think that's the limit.

                              Make sure you close your connections, Once connected they can stay open for 8 hours.

                              http://www.mysql.com/doc/T/o/Too_many_connections.html

                              www.STWOFDesign.com
                              hit me up on icq 154206276 or Skype: JaimeGizzle

                              Comment

                              • -=HOAX=-
                                Confirmed User
                                • Dec 2001
                                • 4365

                                #16
                                The info on that page seems to have helped immensly!
                                Insert Value Here.

                                Comment

                                • Mr.Fiction
                                  Confirmed User
                                  • Feb 2002
                                  • 9484

                                  #17
                                  Originally posted by SetTheWorldonFire
                                  You can have about 100 connections, I think that's the limit.

                                  Make sure you close your connections, Once connected they can stay open for 8 hours.

                                  http://www.mysql.com/doc/T/o/Too_many_connections.html

                                  You can have over 1000 MySQL connections. We've done it.

                                  You just need to tune your my.cnf file to allow more connections. Make sure you have the CPU and memory to back it up.
                                  Don't be lazy, protect free speech: ACLU | Free Speech Coalition | EFF | IMPA

                                  Comment

                                  • -=HOAX=-
                                    Confirmed User
                                    • Dec 2001
                                    • 4365

                                    #18
                                    Originally posted by Mr.Fiction


                                    Make sure you have the CPU and memory to back it up.

                                    I think that's my problem...
                                    Insert Value Here.

                                    Comment

                                    • foe
                                      Confirmed User
                                      • May 2002
                                      • 5246

                                      #19
                                      Yeh basically edit your mysql conf file, I would recomend you set the maximum to 500 connections, most servers will be able to handle that

                                      Comment

                                      • toddler
                                        Confirmed User
                                        • Jun 2002
                                        • 1911

                                        #20
                                        mysql is significantly faster than post for reads. Will see if i can find my notes from when i did my last compare. If i recall though,
                                        doing something small like a select against a table with 5000 entries, and doing an insert based on the result, was about 30%
                                        faster than post.
                                        http://www.flickr.com/photos/zoddler/

                                        Comment

                                        Working...