Temporary 502 errors after updating stylesheets
-
Sometimes when I update my child theme CSS through the Theme editor, that CSS file will give a 502 error for a few minutes and then resolve itself. It doesn’t happen every time, maybe 1 / 10 times.
NGINX error log is showing this message when trying to access that file.
2020/12/05 13:46:34 [alert] 30293#30293: *64051 pread() read only 4728 of 4735 from "/var/www/www.example.com/htdocs/wp-content/themes/generatepress_child/style.css" while sending response to client, client: 35.191.9.21, server: www.example.com, request: "GET /wp-content/themes/generatepress_child/style.css?ver=1607147170 HTTP/1.1", host: "www.example.com", referrer: "https://www.example.com/"The last few times it happened, I went into the Redis plugin settings and flushed the cache and then tried to reload the site again and the CSS file loaded successfully. I’m not entirely sure if it’s just a coincidence because the the problem normally resolves itself after 5 minutes or so anyway but the last time it happened I flushed cache right away and it still resolved the problem.
Some forums seem to suggest this problem is caused by open_file_cache. The settings on my server:
open_file_cache_valid: 3m open_file_cache max: 37440 open_file_cache inactive: 5mI’m not sure if this is related to your plugin or not. My understanding is that object cache is different from file cache. The only reason that I thought there might be a connection is because flushing the cache in your plugin seems to solve the problem.
Does anyone have any idea on what could be causing this or how to stop it from happening?
The topic ‘Temporary 502 errors after updating stylesheets’ is closed to new replies.