cancel
Showing results for 
Search instead for 
Did you mean: 

Increasing too many sleep command queries

Increasing too many sleep command queries

Hello,

I have custom Magento v2.1.6 store.
After launching my store my site got down very often because of max user connection.
It set it to 512 from mysql config, but site exceed max connection again in 1-2 hours.

In normal case, I think Magento does not create any sleep status process in mySQL.

 

My store is customized with

- 3 frontend multiple store (Magento 2 built-in)

- Using persistence shopping cart (Magento 2 built-in)

- Using Braintreepayment (Magento 2 built-in)

- Using Blog module

- Using Review module

- Using J2T reward module

- Using shipping matrix module

and customized option.

Do you have any idea, which part possibly, creating this issue?

 

Please advice.

 

MySQL-Workbench.jpg

 

3 REPLIES 3

Re: Increasing too many sleep command queries

Hi,

 

is that a busy site? 

When you hit the limit again login to MySQL and issue:

 

show full processlist

 

and paste its output here.

Re: Increasing too many sleep command queries

please make sure you have connections limit applied correctly. check value in mysql, and make sure you edit correct config.

or your site under ddos, bots,etc

or you have some extension or custom code that send too many bad queries to database.

------------
MagenX - Magento and Server optimization

Re: Increasing too many sleep command queries

I am having the same problem on a Magento CE 1.9 site.  It is happening during a PCI scan.  I lowered my interactive_timeout and my wait_timeout, but it still happens, I just boot them off before they max out my connections.  I'm trying to figure out what from magento is causing these unclosed connections.