gabriel.salmon Posted March 6, 2014 Share Posted March 6, 2014 For the second time in two weeks my standard build of Prestashop (Version 1.5.2.1) has completely crashed with following error: "Link to database cannot be established: SQLSTATE[42000] [1203] User prs0x6EXpyJ already has more than 'max_user_connections' active connections" I am currently locked out of both the front and back ends of the store. The user "prs0x6EXpyJ" is the Prestashop connection to the SQL database. It is not an outside user. This is the same error I received last week after the store crashed. I updated all passwords to the site and disabled all other accounts to the store but my own superadmin account after the last issue. I reviewed my detailed site access logs and didn't find any external reason that the site would be overloaded. Currently, the only traffic I've had has one use with 114 hits but that's it. I had a previous open thread but it did not get adequately resolved. The only way I was able to resolve the issue before was I resintalled all files (not the database) from an earlier time point that I thought was stable. The store has undergone no changes, uses no customer modules or coding, and is as basic as you can get. It only has two products and very low traffic. Still, this issue of max user connections being exceeded is reocurring and I don't know why. I have talked to my hosting service (Fatcow) and they have confirmed that it does not appear to be from outside access. They scanned all my code for malware and viruses and didn't find anything. They believe that it is something errant in the code that is causing the issue where something in the front end is opening a connection but not closing it. The last crash I had was on 02/25/2014. On that day, my error logs showed the following: 20140225T125029: www.migramin.com/store/index.php PHP Warning: Invalid argument supplied for foreach() in /hermes/waloraweb075/b2751/moo.sobektherapeuticscom/migramin.com/store/classes/Pack.php on line 145PHP Warning: Invalid argument supplied for foreach() in /hermes/waloraweb075/b2751/moo.sobektherapeuticscom/migramin.com/store/classes/Pack.php on line 152 I'm not sure what these error codes mean or if they are related to the first crash. It is odd that they appeared out of the blue given that the store had been up and apparently stable for over a month at that point. In checking my error logs today, I do not see a similar message. In the online Prestashop directory store/log I have one exception log dated from 01/06/2014 which is from before the store was fully configured. It's only contents are as follows: *ERROR* 2014/01/06 - 10:10:12: Property CMS->content is not valid at line 878 in file classes/ObjectModel.php Therefore, I'm not sure where to look for code or how to evaluate which code is creating open connections and then not closing them. If anyone can help on this, I'd greatly appreciate it. Link to comment Share on other sites More sharing options...
gabriel.salmon Posted March 7, 2014 Author Share Posted March 7, 2014 Well, the shop crashed again last night after replacing all files and performing a full backup. I am at a total loss here on what to do. The last build was stable for a week. Now I'm down again. Rechecked my CGI error logs on the host and found no new entries. Does anyone know how I can determine what is making these connections to the mySQL database and not closing them? Link to comment Share on other sites More sharing options...
selectshop.at Posted March 7, 2014 Share Posted March 7, 2014 (edited) SQL errors, are related to problems with your Database server. So a problem with an inconsistent server or broken database. You should inspect your database for broken tables and repair them. If there are no tables broken, so the problem is an inconsistent server and to fix you should move to another database server. Warnings are warnings and you should not use Prestashop with debug-modus activated. Please deactivate debug-modus at your file /config/defines.inc.php if your are not debugging. /* Debug only */ define('_PS_MODE_DEV_', false); if (_PS_MODE_DEV_) The warnings should be repaired and can come from everywhere. Probably non-native extra modules or theme you have installed. You should deinstall each module which is not native and test if the shop runs better. At least please take a look if your server is fulfilling minimal requirements for to run Prestashop. Server configuration should be: magic_quotes_gpc = off memory_limit = 128M min. (better 256M) max_execution_time = 300 max_input_time = 300 upload_max_filesize = 20M post_max_size = 20M max_input_vars = 5000 allow_url_fopen = on safe_mode = off cURL = on - for Paypal and other services with API can to be work mod_rewrite = on Please check with your provider the values and settings. Update your php-version used on the server to at least 5.3.something. php-versions 5.2. are not working well with the latest Prestashop versions. In the online Prestashop directory store/log I have one exception log dated from 01/06/2014 which is from before the store was fully configured. It's only contents are as follows: *ERROR* 2014/01/06 - 10:10:12: Property CMS->content is not valid at line 878 in file classes/ObjectModel.php This log is only a warning for you that you made a change of something in CMS block which was delivering a server error. The error could be you inconsistent server or something else... Edited March 7, 2014 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
gabriel.salmon Posted March 7, 2014 Author Share Posted March 7, 2014 Thanks very much for the help. I'm going to inquire with my hosting provider. I also noticed that others have had this issue but they were not posted on the English forum. Another thread from last September with the following title was on the French forum with no clear resolution stated. Error "Link to database, established cannot be: SQLSTATE [42000] [1203] Link to comment Share on other sites More sharing options...
Recommended Posts