I have

  • php-fpm 7.0.11 - with ioncube
  • nginx 1.10.x
  • mariadb 10.1

I'm using the PHP-FPM to static, I never had any problems with this. The High CPU usage occurred randomly, and now it's permanent. I didn't make any changes.

At the time we are talking the CPU usage is at 100% with most of the PHP-FPM processes in R state.

Here is a top output My CPU is 16 threads

top - 08:21:15 up 31 min,  2 users,  load average: 799.18, 782.54, 620.78
Tasks: 1082 total, 799 running, 283 sleeping,   0 stopped,   0 zombie
%Cpu(s): 98.5 us,  1.3 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.2 si,  0.0 

My webserver is getting more than 5000 requests / second but with this amount everything was fine before.

Is very strange because:

  • If i replace the ioncubed , with the original source of PHP file, the load is decreasing to 8 , as well as the cpu usage to only 15-20%

  • If i KEEP the ioncube, but stop the mysql, the load average and cpu is decreasing too.

  • Sometimes when i change the sysctl config, the cpu is decreasing for 10 seconds but then again it goes 100%

I can't explain this, because if it was the ioncube, i would have the problem with the 2) but i don't.

I really have lost my hair trying to find the real cause of it and it makes me crazy because that happened when i didn't change anything.

My sysctl file is as follow:

net.core.wmem_max= 1677721600
net.core.rmem_max= 1677721600
net.ipv4.tcp_rmem= 1024000 8738000 1677721600
net.ipv4.tcp_wmem= 1024000 8738000 1677721600
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_no_metrics_save = 1
net.core.netdev_max_backlog = 8000
net.core.somaxconn = 65535
  • Please post your www.conf file. – 2ps Jan 14 '17 at 16:43
  • The bug is on IonCube. I contacted them. There was a line, that for some reason caused problem on Ioncube encoded files, but with source files it was OK. It didn't happen when i was closing mysql, because that line was AFTER mysql connection. – user3393046 Jan 15 '17 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.