mysqli - MySQL hanging in Writing to Net -


i have problem, when mysql thread sometime stuck @ status "writing net".

i have 4 apache server(2.4) (requests load-balanced on them) 1 mysql (mariadb 10). apache executing php56. apache servers have same configuration. servers runs on centos 7. selinux disabled on apache servers debug reasons. no problems in audit logs on db server. servers virtual , located on same cluster(vmware).

problem appear on specific pages , specific queries db. there around 100-200 separate queries on page , of them takes 0.0001-0.0010 s. have 1 query takes around 1-2sec. query take lesser time (around 0.0045s). problematic query returns around 8984 rows , when executed cli debug script, executed fast expected.

strange in time apache servers execute page quickly, , slowly. changes(during day). tried remove 1 apache server cluster , send same request. if server not under load, responds fast.

all server have enough resources (cpu , ram) not load issue. have around 4-10 active apache workers (prefork) , have capacity 100 active workers.

i tried debugging tcpdump , when requesting page, can see packet flow fast queries , stops while , resumes. not sure if problem on mysql server or on apache server.

my guess hitting kind of limit, have no idea one. spent few days googling solution without success.

thanks advice.

so, solution quite odd.

first few more details: apache severs have same application data (php files, images, etc..) mounted nfs. nfs share working fine (low latency, no data corruption).

solution: when desperate went through every possible log. noticed iptables dropping packets nfs server. said myself should fix that, when not related.

but after allowed traffic nfs apache servers, mysql status "writing net" disappeared , websites started respond quickly.

if can make reason feel free comment :) know real problem.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -