Answer the question
In order to leave comments, you need to log in
Why does a PHP script slow down on the first run, but flies on subsequent runs?
There is the usual standard WordPress from the official box with the official theme, fresh and installed with no content. At the first visit, any page is generated in more than a second, on subsequent visits it takes 1/10 second and faster. It doesn't matter which page you go to. It is enough to go to any page, it will be generated in a second, and then also any page will be generated at least 10 times faster, and sometimes 20-30 times faster.
If then you do not enter for several hours, then again the same - first a long generation, then a fast one.
WordPress runs on a lightly loaded dedicated powerful server. Caching in WP did not set up any specially. On the server, the standard bundle is nginx + apache + php + mysql.
Is it possible that PHP caches the bytecode the first time it is generated and therefore subsequent runs are 10-20 times faster? Is this situation normal? Could this be due to some server software settings?
Here is the patient: wordpress-test.eurodir.ru/wordpress
Here is his PHPinfo: wordpress-test.eurodir.ru/phpinfo.php
Answer the question
In order to leave comments, you need to log in
First, you have APC installed.
Secondly, wordpress still caches data out of the box.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question