search

Home  >  Q&A  >  body text

linux - Help: php high CPU usage

linux deployed lnmp
Recently found that the server CPU usage is very high,
Use strace -cp 30811 to find out

There is one access that is the most occupied

Call strace -T -e access -p 30811 again, the result is as shown:

But I couldn’t find anywhere in the program where access is used
I couldn’t find the access function when looking for PHP functions.
I really don’t know who is calling this thing, and the CPU remains high every day. So melancholy.

I hope someone who knows can help. Help points out who is calling, is it the bottom layer of PHP or Linux or something else?
Grateful.

天蓬老师天蓬老师2823 days ago1023

reply all(2)I'll reply

  • 迷茫

    迷茫2017-06-30 09:57:09

    Generally, php is occupied once every time a page is opened. Are you related to processes, scheduled tasks, etc. in cli mode?

    reply
    0
  • 学习ing

    学习ing2017-06-30 09:57:09

    Access is a Linux system call used to check the user's permissions on a file. There are many access errors in the output of strace -cp. Is it because some files do not have access permissions?
    In addition, I personally feel that when PHP is accessed through fastcgi, the CPU is usually higher (especially on Windows).

    reply
    0
  • Cancelreply