title: High CPU Usage in php-fpm
body: <p>i am using WordPress Nginx’s fastcgi-cache and have High CPU Usage in php-fpm
  i have tracked the process
  and all give me the same thing</p>
  
  <pre><code>gettimeofday({1399054255, 543565}, NULL) = 0
  gettimeofday({1399054255, 543621}, NULL) = 0
  gettimeofday({1399054255, 543678}, NULL) = 0
  gettimeofday({1399054255, 543739}, NULL) = 0
  </code></pre>
  
  <p>-
  and counting all the process doing the same thing
  i have searched a lot for the last 5 days and i have tested all what can i do
  i have changed themes disabled plugins
  i have done new wordpress install but nothing
  i have changed php-fpm config files to every thing possible</p>
  
  <p>this is my config now</p>
  
  <pre><code>pm = dynamic
  pm.max_children = 10
  pm.start_servers = 4
  pm.min_spare_servers = 2
  pm.max_spare_servers = 6
  pm.process_idle_timeout = 10s;
  pm.max_requests = 200
  </code></pre>
  
  <p>i do not have visitors
  even if i the only visitor the cpu spikes to 100% until the this process ended</p>
  
  <pre><code>gettimeofday( NULL) = 0
  </code></pre>
  
  <p>all day long</p>
  
  <pre><code>gettimeofday({1399054255, 547438}, NULL) = 0
  gettimeofday({1399054255, 547564}, NULL) = 0
  gettimeofday({1399054255, 547665}, NULL) = 0
  gettimeofday({1399054255, 548304}, NULL) = 0
  gettimeofday({1399054255, 548415}, NULL) = 0
  gettimeofday({1399054255, 548517}, NULL) = 0
  </code></pre>
  
  <p>please help this is frustrating</p>
  
  <p>update: this command   strace -c -p 21731
  give me this </p>
  
  <pre><code>% time     seconds  usecs/call     calls    errors syscall
  ------ ----------- ----------- --------- --------- ----------------
   99.81    0.080469           0   4888644           gettimeofday
    0.11    0.000088           0      1501           sendto
    0.02    0.000017           0      3500        25 read
    0.02    0.000016           0      2363        26 stat
    0.01    0.000010           0      1926           recvfrom
    0.01    0.000008           0      1801       600 lstat
    0.01    0.000007           0       590           getcwd
    0.00    0.000004           0      1191           clock_gettime
    0.00    0.000000           0       103           write
    0.00    0.000000           0      1074           open
    0.00    0.000000           0      1273           close
    0.00    0.000000           0      1258           fstat
    0.00    0.000000           0      2500           poll
    0.00    0.000000           0      1078           lseek
    0.00    0.000000           0        28           mmap
    0.00    0.000000           0        28           munmap
    0.00    0.000000           0         1           brk
    0.00    0.000000           0        51           rt_sigaction
    0.00    0.000000           0        23           rt_sigprocmask
    0.00    0.000000           0         1           rt_sigreturn
    0.00    0.000000           0         4           ioctl
    0.00    0.000000           0      3090       361 access
    0.00    0.000000           0       128           nanosleep
    0.00    0.000000           0        28           alarm
    0.00    0.000000           0        36           setitimer
    0.00    0.000000           0        30           socket
    0.00    0.000000           0        38        14 connect
    0.00    0.000000           0        11         2 accept
    0.00    0.000000           0         3           recvmsg
    0.00    0.000000           0         9           shutdown
    0.00    0.000000           0         1           bind
    0.00    0.000000           0        21           getsockname
    0.00    0.000000           0        14           getpeername
    0.00    0.000000           0        14           getsockopt
    0.00    0.000000           0        73           fcntl
    0.00    0.000000           0       320           getdents
    0.00    0.000000           0        18           chdir
    0.00    0.000000           0        36           getrusage
    0.00    0.000000           0        18           times
    0.00    0.000000           0       160           openat
  ------ ----------- ----------- --------- --------- ----------------
  100.00    0.080619               4912986      1028 total
  </code></pre>