Hi I need help to understand this issue: I just installed vBulletin and imported posts from phpBB. From time to time it gives this error and MySQL stops functioning for an hour or so: "Database error in vBulletin : mysql_pconnect(): Too many connections /path_to_forum/includes/class_core.php on line 279" I contacted webhosting support and they said: I wonder if this is normal... Is it because of my webhost or because of the new installation of vBulletin...?
Many webhosts put a limit on mysql as to connections to not overload their servers, etc. Ask your webhost what your limit is, to increase it (may cost more), give you more mysql storage, or find another host.
You're using persistent connections. That leads to having more connections open at a time so it's generally a bad idea. Use regular connections (mysql_connect()). I thought recent vBulletin versions defaulted to mysql_connect instead of mysql_pconnect though. Anyhow vBulletin people would know where to change it.
Thanks for your responses. This is the latest version of vBulletin running and it uses mysql_pconnect(). Indeed the guys from vBulletin support told me to change a variable in config.php in order to turn off persistent connections. The hosting support said the limit is set to 500. Is this the max number of users that may be online at the same time? Because my forum is not that bit, there're only 10-15 users online at any time. I changed that setting in vB config.php and we'll see what happens.
Update: after the webhost increased the max limit of MySQL connections allowed (500) with 10%, the errors keep showing up: The webhost support said: What should I tell them, which one is the error I'm getting? Thanks!
That first error means it couldn't connect to the server at all, which isn't due to a connection limit. Most likely the MySQL server had crashed and was offline.
Hi, I've also got a issue with MySQL. I'm working on a social networking site. Rate My Homie What I'm trying to do is related to the LIMIT clause in the SQL query. Trying to SELECT only a certain criteria of users LIMITed starting from a specific row number. But if I do LIMIT 21,1 it returns something from like row 17. Its hard to explain and do.
Not possible unless you haven't specified an ORDER BY for the query, or that order changes as new data is inserted.