GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Anyone know how to solve this? (https://gfy.com/showthread.php?t=68391)

-=HOAX=- 07-18-2002 11:20 AM

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

Amputate Your Head 07-18-2002 11:26 AM

hmmm..... I have seen this before....

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

-=HOAX=- 07-18-2002 11:30 AM

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?

-=HOAX=- 07-18-2002 11:37 AM

C'mon...help GFY maintain its one useful thread a day quota!

DjSap 07-18-2002 11:48 AM

well copy and paste line 4 otherwise its kinda hard...

pipp 07-18-2002 11:51 AM

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

JFPdude 07-18-2002 11:55 AM

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.

Sysyphus 07-18-2002 12:03 PM

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...

FierceHost 07-18-2002 12:03 PM

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.

vending_machine 07-18-2002 12:07 PM

Quote:

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...

vending_machine 07-18-2002 12:08 PM

Quote:

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.

vending_machine 07-18-2002 12:09 PM

Quote:

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.

-=HOAX=- 07-18-2002 12:24 PM

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...

-=HOAX=- 07-18-2002 12:24 PM

And the free command is not used in freebsd btw.

SetTheWorldonFire 07-18-2002 01:03 PM

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

-=HOAX=- 07-18-2002 01:30 PM

The info on that page seems to have helped immensly!

Mr.Fiction 07-18-2002 01:36 PM

Quote:

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

:thumbsup

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.

-=HOAX=- 07-18-2002 01:41 PM

Quote:

Originally posted by Mr.Fiction


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


I think that's my problem...

foe 07-18-2002 01:41 PM

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

toddler 07-18-2002 01:44 PM

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