Please can somebody please help, and explain what this means and where the problem is?
Is it with my server or is it a problem with a file? I am despeerate to fix this quick!
many many thanks in advance.
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: mysql_connect(): Too many connections
Error type/ Nr.: Warning - 2
File: /hsphere/local/home/urbanspa/website.com/manager/includes/extenders/dbapi.mysql.class.inc.php
Line: 85
Line 85 source: if (!$this->conn = ($persist ? mysql_pconnect($host, $uid, $pwd) : mysql_connect($host, $uid, $pwd))) {
Parser timing
MySQL: 0.0000 s s (0 Requests)
PHP: 0.0253 s s
Total: 0.0253 s s
First thing to try is to disable stats.
-
MODX Staff
- 12,272 Posts
Ahhh... you tried to connect at MODx while a backup was going on. It was a bit resource starved I’m afraid, and MySQL just refused to cooperate!
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
many thanks, I will disable stats – just curious as to why that might work? is it as simple as it just reduces the load on the database? It only seems to last for a short while, 10-30min.
-
☆ A M B ☆
- 24,524 Posts
Yes, it’s probably just that simple. If your host server has as many as 400 websites hosted on it, which is quite possible, and it gets busy, the database can get overwhelmed. Of course, that also depends on how the database engine is configured; it can be set to allow more or less connections at a time.
Disabling stats has made a huge difference. The site I’m working on gets roughly 500 visits per day, and I guess the MySQL server simply couldn’t cope. I should probably move it to a better host. Thanks for the tip!
– hoho
-
MODX Staff
- 12,272 Posts
500 visitors a day is definitely not a load that should kill a site. Sounds like a shared server that might have a few too many accounts using the same resources.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me