Jump to content

Status 500 errors & max_user_connections on product page (backend)

Recommended Posts

Since i've reinstalled Prestashop 1.7 (a rebuild for a 1.6 site) i'm encountering lots of status 500 errors when modifying products. 
When loading the product page (product/form/id/...) there is 500 errors on some json pages, like index.php/attribute/get-all,  /index.php/specific-price/list/, index.php/combination/product-combinations, (randomly, not always all of them) which causes the page not to function. 

When loading the json pages seperately the problem doesn't occur. The problem exists on all product pages. 

Subsequently, when saving a change, the 500 error occurs on the save url (POST) /admin/index.php/product/form/... url as well - about 60% of all requests. 

The 500 errors seems to be caused by a max_user_connnections mysql error:

PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [1203] User (...) already has more than 'max_user_connections' active connections in (...)/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43

Stack trace:

#0 (...)/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(43): PDO->__construct((...))

#1 (...)/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php(44): Doctrine\DBAL\Driver\PDOConnection->__construct(...)

#2 (...)/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(360): Doctrine\DBAL\Driver\PDOMySql\Driver->connect(...)

#3 (...)/vendor/twig/twig/lib/Twig/Loader/Chain.php on line 129

Thinking a raise of the allowed connections would fix the problem, i've contacted the hosting provider, but they reckon it is not a common (Prestashop) issue, and the limit they maintain should be sufficient.  (I'm not sure what the limit is).

Doing some research i found that it could be a over eager crawler/bot, so i've disallowed all in robots.txt - without any improvement. (And it also happens locally bt==. 

Also, i do not think it is caused by any third-party modules, since i've only installed a single payment module.

Is anyone familiair with this problem? What could cause this issue and how could it be solved? 

Love to hear.



Share this post

Link to post
Share on other sites

'max_user_connections' is definitely a server issue. I have seen several hosting plans with very low MySQL limits.

Share this post

Link to post
Share on other sites

We have a limit of 100 - but the message still shows 30

In addition, this can happen when we only have 2 or 3 users online according to analytics

Our hosting provider say it is a know inssue with prestashop not releasing db connection, so i am trying to see if anyone else who has had this has managed to find a solution


- Andrew

Share this post

Link to post
Share on other sites

We have no limit on database connections.

Some hosting providers try to limit various parameters and it complicates life. I have seen a lot of "strange" restrictions. This is one of them.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More