Costantini Posted October 4, 2019 Share Posted October 4, 2019 Hello to everyone, we have some problem with our website: Costantini wines. From saturday we found this error when we tried to connect to the website or in the backoffice Link to database cannot be established: SQLSTATE[HY000] [1203] User dbo624745692 already has more than 'max_user_connections' active connections we solved it parzially throw delete some dates in the database like connections, empty cart ecc... Now the problem is a little solved but sometimes we have this error that appaer. Can someone help us? i think is a problem of some query that are much long or dont close the connection good... thanks Link to comment Share on other sites More sharing options...
joseantgv Posted October 4, 2019 Share Posted October 4, 2019 How many connections do you have? It's probably an issue with your MySQL server configuration, but not related with PS. Link to comment Share on other sites More sharing options...
andrew Posted April 29, 2020 Share Posted April 29, 2020 Hi Did you make any progress? We have the same issue The max_user_connections is set as 100 we get > 30 in the error message The host says it is a well know prestashop issue - but not well known enough that we can find any solution! 1 Link to comment Share on other sites More sharing options...
Costantini Posted April 29, 2020 Author Share Posted April 29, 2020 43 minutes ago, andrew said: Hi Did you make any progress? We have the same issue The max_user_connections is set as 100 we get > 30 in the error message The host says it is a well know prestashop issue - but not well known enough that we can find any solution! i solved it. I trasferred all the webspace on a private server and now we dont have problem. I think is the only solution when you have a lot of people and order on your website. 1 Link to comment Share on other sites More sharing options...
andrew Posted April 29, 2020 Share Posted April 29, 2020 Thanks for the update ..... We don't have so many visitors - analytics has never shown > 16 visitors at any one time We have just removed the gamification module (as suggested in one post) - and the site seems faster (and no errors in an hour which is quite a long time for us!) - Andrew 2 Link to comment Share on other sites More sharing options...
danielrinf2 Posted June 14, 2020 Share Posted June 14, 2020 Hello Andrew. Have you been able to find a solution? I have the same problem.... However, rather than finding a solution, I want to understand the cause of this problem. In my case, I have a new and clean installation of pretashop 1.7.6.5 and it gives me the error when I do some configuration in the back office. The config in my hosting for the variable "max_user_connections" is 5, However, I am the only one connected and I only try to open any page in the backoffice ... I really don't understand the cause of the error. Link to comment Share on other sites More sharing options...
Costantini Posted June 14, 2020 Author Share Posted June 14, 2020 8 hours ago, danielrinf2 said: Hello Andrew. Have you been able to find a solution? I have the same problem.... However, rather than finding a solution, I want to understand the cause of this problem. In my case, I have a new and clean installation of pretashop 1.7.6.5 and it gives me the error when I do some configuration in the back office. The config in my hosting for the variable "max_user_connections" is 5, However, I am the only one connected and I only try to open any page in the backoffice ... I really don't understand the cause of the error. We bringed the webspace to a new dedicated server and now the problem appaer to be fixed. Link to comment Share on other sites More sharing options...
danielrinf2 Posted June 14, 2020 Share Posted June 14, 2020 6 hours ago, Costantini said: We bringed the webspace to a new dedicated server and now the problem appaer to be fixed. Hi, That was not a solution. When you move to a dedicated server, this server have "max_user_connections" limitless or a very high value and you will not get the error anymore. however the problem persist. Why there are more than a few connection opened? That is the real thing to discover. 1 Link to comment Share on other sites More sharing options...
andrew Posted June 15, 2020 Share Posted June 15, 2020 We solved the problem by changing the search It was taking too long and causing the resources on the server to be limited We haven't had the issues since 1 Link to comment Share on other sites More sharing options...
ericksonvornes Posted February 11, 2021 Share Posted February 11, 2021 On 6/15/2020 at 4:42 PM, andrew said: We solved the problem by changing the search It was taking too long and causing the resources on the server to be limited We haven't had the issues since How did you do that??, can be more specific?? Link to comment Share on other sites More sharing options...
webinspire Posted June 10, 2021 Share Posted June 10, 2021 Hi any updates about this issue? [PrestaShopException] Link to database cannot be established: SQLSTATE[HY000] [1203] User r24h_pr already has more than 'max_user_connections' active connections at line 136 in file classes/db/DbPDO.php Fresh prestashop 1.7.7.2 - how to debug how many connections are opened? I think it is not about visitations of the shop by users but Prestashop try to connect to database with a few plots at ones. It should be one user and one instance of connection. Link to comment Share on other sites More sharing options...
danielsaar Posted August 8, 2021 Share Posted August 8, 2021 Hi all, yes, I have the same. " [PrestaShopException] Link to database cannot be established: SQLSTATE[42000] [1203] User o3177123 already has more than 'max_user_connections' active connections at line 136 in file classes/db/DbPDO.php 131. public function connect() 132. { 133. try { 134. $this->link = $this->getPDO($this->server, $this->user, $this->password, $this->database, 5); 135. } catch (PDOException $e) { 136. throw new PrestaShopException('Link to database cannot be established: ' . $e->getMessage()); 137. } 138. 139. $this->link->exec('SET SESSION sql_mode = \'\''); 140. 141. return $this->link; DbPDOCore->connect - [line 330 - classes/db/Db.php] DbCore->__construct - [line 241 - classes/db/Db.php] - [4 Arguments] DbCore::getInstance - [line 47 - config/alias.php] pSQL - [line 1336 - classes/shop/Shop.php] - [1 Arguments] ShopCore::findShopByHost - [line 337 - classes/shop/Shop.php] - [1 Arguments] ShopCore::initialize - [line 118 - config/config.inc.php] require - [line 27 - index.php] - [1 Arguments] " It is Strato or is Presta so buggy? This is a simple new and not changed installation. yours,Daniel Link to comment Share on other sites More sharing options...
SmartDataSoft Posted August 8, 2021 Share Posted August 8, 2021 @danielsaar What is your PrestaShop version and what is your php version. Is this new PrestaShop or old PrestaShop. You can check if your any module call the database connection unmanaged way, This occure due to unmanaged module , if database connection is open but not closed when work done. Thank you Link to comment Share on other sites More sharing options...
webinspire Posted August 8, 2021 Share Posted August 8, 2021 I have this issue with newsest prestashop 1.7.7.5 and themes from leothemes. How to check if any module call the database connection unmanaged way ? Is there any server tool to watch it? Link to comment Share on other sites More sharing options...
SmartDataSoft Posted August 8, 2021 Share Posted August 8, 2021 You can log in your server using ftp and rename all thidparty module one by one then check. I think this is done by thirdparty module. If you are able to log in admin from performance tab you can disable all module Disable non PrestaShop modules. and then check. If you do not mind you can check myshop theme also. Thank you Link to comment Share on other sites More sharing options...
danielsaar Posted August 9, 2021 Share Posted August 9, 2021 On 8/8/2021 at 8:14 PM, SmartDataSoft said: @danielsaar What is your PrestaShop version and what is your php version. Is this new PrestaShop or old PrestaShop. You can check if your any module call the database connection unmanaged way, This occure due to unmanaged module , if database connection is open but not closed when work done. Thank you Hi SmartDataSoft, Presta is 1.7.7.5 and it was PHP 7.4. But after some "deprecated-messages" I had to change to 7.2. At the meantime, Presta runs stable, but I can't change the Debug-Mode to off. Thanks Daniel Link to comment Share on other sites More sharing options...
SmartDataSoft Posted August 9, 2021 Share Posted August 9, 2021 You can try to disable debug mode by following this article Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now