A
A
Arseny Sokolov2015-04-19 16:40:59
WordPress
Arseny Sokolov, 2015-04-19 16:40:59

Why is PHP taking so long to run?

Here's a picture:
- when you directly access the php script, everything is processed normally.
- when accessing a php script through apache, the response is given after 10 seconds.
Tell me where to look and what to do?
If you try to get data via curl, then you can see that apache itself responds 10 seconds after accessing it, but there is no problem with static html pages.
The problem was in a completely different place. I removed this section and everything began to fly, but how does this relate to the brakes in operation?

ScriptAlias /munin-cgi/munin-cgi-graph /var/www/cgi-bin/munin-cgi-graph
<Location /munin-cgi/munin-cgi-graph>
       Options +ExecCGI
       <IfModule mod_fcgid.c>
               SetHandler fcgid-script
       </Ifmodule>
       <IfModule mod_fastcgi.c>
               SetHandler fastcgi-script
       </IfModule>
       <IfModule !mod_fastcgi.c>
               <IfModule !mod_fcgid.c>
                       SetHandler cgi-script
               </IfModule>
       </IfModule>
       Allow from all
</Location>

I made a big mistake, after deleting this section it didn’t work quickly for a long time, now everything has returned to its place again - again now the delays can be up to 30 seconds.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor Vorotnev, 2018-04-10
@HeadOnFire

In the browser developer tools in the Network tab, look at this XHR request, see what it returns. Most likely a handler error.

A
Arseniy Sokolov, 2015-04-20
@ArsenBespalov

Problem solved:
1. Long authorization via SSH and the inability to use the Internet from the server was solved by replacing the DNS provider, it turned out that DNS was not working.
2. Changed the format of the Apache logs, because it turned out that Apache, even with normal DNS, still cannot resolve names. I set it to write to the logs only IP addresses of clients and thus the speed of work returned to the previous one, it even began to work a little faster. Such logs suit me more than, especially since it is never too late to convert ip to names using the logresolve utility .
In general, the problem turned out to be on the side of the provider. I wrote to the support service about my adventures, let's see what they decide. I note that nothing like this has ever been observed at Amazon. Why this always happens to Russian companies remains an open question.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question