Topic: Too many connections

Hi,

We are three persons on line in the same times testing  punbb and we got this error :

Unable to connect to MySQL server. MySQL reported : Too many connections

My hoster said I had 5 simultuneus connections and in should be enough ...

Do you have an idea what's hapenned, and how to solve it ?

Tx

Re: Too many connections

I would choose a different host. 5 connections is nothing.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Too many connections

I used to have that problem whenever i hit 50 connections, i switched to a new host and now i never get it smile

Re: Too many connections

omg 5.....

5

Re: Too many connections

buzzkill wrote:

omg 5.....

you can say that again its rediculous

Re: Too many connections

do you have persitent mysql connections enabled ????.

If so turn it off. Non persitent connections will be terminated much earlier.  persitent connection do not really work with php. And cost more resources then the save.

Re: Too many connections

5 is too weak so ...
How much do you have yourself ? What'is the hoster mean ?

Rickard,
Do you have an idea how long (average) the connection (for a long page ) can be opened. I was thinking to change of provider, but I'm pretty sure then plenty of hoster limit the number of connections --> punbb won't work eveywhere ....



Orpheus,
Could you explain me what is it persitent mysql connections ? How could I turn off ?

Tx

Re: Too many connections

its probably not you its probably cos your on a server with lots of other people, if it is you and they limit to 5 connections then they seriously suck, if you turn on show queries you can see the total query time for a page,

all hosts have to limit mysql connections but to get alot of connections simultaneously isn't that easy

persistant connections is an option in config.php (either set to true or false) it means that the connection(s) to mypunbb are left open then the next visitor on your site uses the same connection, its unlikey to cause problems for you but it could for other people using the same server as you would have all the connections open all the time

Re: Too many connections

Rickard wrote:

I would choose a different host. 5 connections is nothing.

Not really. That mean on the same microsecond you have 5 SQL connections opened, on a lot of website that's enough.

Of course, if PunBB is opening SQL connection from top to end of each script, that's a different story smile

Re: Too many connections

PunBB, similar to every other PHP/MySQL application out there, opens a connection at the beginning of each script and then closes it at the end of the script execution. PunBB does not differ in any way. If PunBB doesn't work on a server because it uses up too many connections, that means e.g. phpBB or vBulletin won't work either.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

11

Re: Too many connections

Too bad for me, my forum and website are located on the same MySQL access and abcdelasecurite.free.fr receive very often the "Unable to connect to MySQL server. MySQL reported: Too many connections." message.

In fact, each time there is more than 50 users at the same time (limited by my free host).