M
M
mr-zherart2016-03-27 01:44:21
PHP
mr-zherart, 2016-03-27 01:44:21

What could be the reason for the long script processing in the Wordpress admin panel (nginx php-fpm)?

The problem is the following. When updating user data in the WordPress admin panel, the script runs for a very long time, there was a problem with a 502 time-out error, set fastcgi_read_timeout 150, everything works, but for a very long time. On LAN, on normal Denver, everything works fine. On the cloud there is a bunch of nginx + php-fpm + opcache + selective memcached under ubuntu. The site flies, but there is a problem with this.
I give part of the nginx setup, if you don’t judge strictly, I’m trying the whole thing for the first time.

location / {
    try_files $uri $uri/ /index.php?$args;
}
location ~ [^/]\.php(/|$) {
  fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  if (!-f $document_root$fastcgi_script_name) {
    return 404;
  }

  # Backend server
  fastcgi_pass unix:/var/run/php5-fpm.sock;
    
  include fastcgi_params;
  fastcgi_index index.php;
        fastcgi_read_timeout 150;
    
  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  fastcgi_param QUERY_STRING    $query_string;
}

Thank you!
UPD: Thanks to the advice, I saw that the problem is in the long TTFB
fcda9a31c60343c084f4722ecfd3dd45.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mr-zherart, 2016-03-27
@mr-zherart

Thank you very much for the thought process of dimasmagadan and Ninja Mate .
So, after I went looking for the reason for the long TTFB, I came across serverfault.com/questions/350062/the-strange-case-...
on the advice I also turned on slowlog php-fpm which showed that the problem is in mail() php in the handler , as a result, I checked the work of sendmail and it turned out that it was he who sent letters for a minute. I went to ect/hosts and changed the settings as described here https://brianhogg.com/how-to-fix-slow-sendmail-on-...
Everything worked!

D
Dmitry, 2016-03-27
@dimasmagadan

why do you think that it is php that slows down?
Can you enable the slow mysql query log on the server?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question