php - MySQL number of threads_connected slow down my website -


i have store running on prestashop 1.5.4. keep having problem site behaviour.

everytime check number

user@server:~$ mysql -se "show status '%threads_connected%'" 

if number gets above 25, site becomes slow. opening page takes forever , page load can high 1 - 2 minutes.

the solution (temporary) me restart apache services.

i pretty sure 25 pretty low number.

in case need know, don't have direct access my.ini nor access mysql server configuration. database stored in shared (dbass).

i have full access webserver (apache2.conf, php.ini, www.example.com.conf)

a little info might help:

-se "show variables '%max%'" 

outputs:

image 1 image 2

i guess question how can improve performance ? can improve limiting number of "threads_connected" ?

footnote:

i aware there bad query somewhere in code, however, @ moment need quick solution this. reviewing queries can take time.

edit #1

perhaps information might give ideas

php.ini php.ini

edit #2 apache2.conf

can improve limiting number of "threads_connected"?

absolutely not.

all limiting number of connections cause errors users of site, because particular apache process wouldn't able connect database.

the problem not number of threads connected. symptom of real problem, have 1 or more queries perform poorly, or not have enough memory for apache scale up when traffic gets heavy, forcing machine heavily swapping, , thereby slowing down apache point keeps connections open longer.

i need quick solution this

sorry... there isn't solution other find actual problem , fix it.

more useful number of connections what these connections doing right now?

show full processlist; in mysql answer question. if sleeping, aren't hurting on mysql side, , may want limit number of apache processes, if side effect of level of site traffic, server may small, or may need disable http keepalive, or tweak timeout, if browser connections holding open apache children idle, consuming memory.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -