Jump to content

Link to database cannot be established: SQLSTATE[HY000] [1203] User dbo624745692 already has more than 'max_user_connections' active connections


Costantini

Recommended Posts

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

  • 6 months later...

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!

  • Like 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

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

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

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.

  • Like 1
Link to comment
Share on other sites

  • 7 months later...
  • 3 months later...

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

  • 1 month later...

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...