![]() |
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 |
hmmm..... I have seen this before....
but no, I don't know how to fix it. |
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? |
C'mon...help GFY maintain its one useful thread a day quota!
|
well copy and paste line 4 otherwise its kinda hard...
|
Switch to postresql handles complexity much bether then mysql. What kind off querys are you running that are causing this ?
|
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. |
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... |
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.
|
Quote:
|
Quote:
|
Quote:
If your queries aren't streamlined and optimized, upping the number of max connections isn't going to help you. |
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... |
And the free command is not used in freebsd btw.
|
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 :thumbsup |
The info on that page seems to have helped immensly!
|
Quote:
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. |
Quote:
I think that's my problem... |
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
|
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. |
| All times are GMT -7. The time now is 12:44 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123