A partial archive of https://discourse-mediawiki.wmflabs.org as of Saturday May 21, 2022.

My website delay is too high

RazeSoldier

Pre-declaration: The delay here is not referring to the loading time of the web page, but how long the change is reflected on the client after a file is modified.

Now my site gets weird, file changes can not be immediately reflected to the client. Even if I deliberately made a fatal error, the page still shows up normal, it will take a while before server give a HTTP 500 error. It does not seem to have anything to do with the application code, I guess my web server have a problem. Considering this situation did not occur before, I think it’s FastCGI caused this problem.

Have you encountered the same situation? My web server is apache, interpret PHP code via FastCGI.

Tgr

What cache headers is your site sending out?

RazeSoldier

My server responsed: Cache-Control:private, must-revalidate, max-age=0.

Tgr

I guess then you are talking about code changes not taking immediate effect, not wiki page / uploaded file content changes? Typically that’s due to aggressive opcode caching, such as using APC with apc.stat set to 0.

RazeSoldier

I am using APCu. I can’t find apc.stat in the manual, perhaps this option is APC unique configuration. And I do not think this problem is caused by APCu, because the problem persists after I disable APCu extension.

RazeSoldier

I feel FastCGI has the same effect as apu.stat = 1.

RazeSoldier

I know what happened there. Since I set opcache.validate_timestamps = 0 in my php.ini. Everything returned to normal except for reduced performance after set opcache.validate_timestamps = 1. I can start developing the code again. :wink: