css 404 error
-
It is now the second time in 3 days that I need to purge the server cache because the css is not found on the server 404.
I am using Elementor (pro) as a plugin and a separate path for the wp-content folder. These should be the only plugins beeing able to help cause this.
It worked for 12 months fine.
Here a screenshot:
https://securesha.re?#u=a1d875ff4f9123e2073e2e35dbebb2fb.bin&p=QKcWDd6hk4IgUMv1-_/32QIA0VoJP4jkzL2mliCvug0
-
Here some logs so you can verify:
2020-09-28 08:50:33 UTC [nginx][crit] 16373#0: *3129390 openat() “XXX/public_html/medien/siteground-optimizer-assets/siteground-optimizer-combined-css-156e97c5708597b22551a1cd3adb24ca.css” failed (13: Permission denied), client: XXX, server: XXX.at, request: “GET /medien/siteground-optimizer-assets/siteground-optimizer-combined-css-156e97c5708597b22551a1cd3adb24ca.css HTTP/1.1”, host: “www.XXX.at”, referrer: “https://www.XXX.at/path”2020-09-28 08:32:42 UTC [nginx][crit] 38088#0: *3108173 openat() “XXX/public_html/medien/siteground-optimizer-assets/siteground-optimizer-combined-css-4e3c0cbb06fc07dbeb8090c9b385b166.css” failed (13: Permission denied), client: XXX, server: XXX.at, request: “GET /medien/siteground-optimizer-assets/siteground-optimizer-combined-css-4e3c0cbb06fc07dbeb8090c9b385b166.css HTTP/1.1”, host: “www.XXX.at”, referrer: “https://www.XXX.at/”
2020-09-28 08:32:41 UTC [nginx][crit] 38088#0: *3108154 openat() “XXX/public_html/medien/siteground-optimizer-assets/siteground-optimizer-combined-js-54bdd9a20d536df25b5a7b2ae2311751.js” failed (13: Permission denied), client: XXXX, server: XXX.at, request: “GET /medien/siteground-optimizer-assets/siteground-optimizer-combined-js-54bdd9a20d536df25b5a7b2ae2311751.js HTTP/1.1”, host: “www.XXX.at”, referrer: “https://www.XXX.at/”
Update (answered by Stoycho V.):
Based on my observations our plugin successfully generates the directory where the minified assets will be stored, however one of the main folders where the minified .css files are stored had incorrect permissions:
711This could easily lead to permission errors such as the one reported in the Error Log.
———
So the issue has something to do that the plugin does not create the correct permission for the folder, so we get a 404 error.
Is this something you can fix in your plugin?
Update:
4th day in a row a missing combined css file leads to a 404 error and leaves behind 100s of customers seeing a broken site….
I went ahead and verified if the combined css file was on the server. Surprisingly the one which is missing is actually really not on the server.
So not as reported by your colleague a file permission error!
There are a lot of other js and combined css files on the server and when manually purging the sg cache the site shows up normal again and the auto generated css file is also normally created on the path.So 2 ideas come up:
1. When your plugin automatically creates a new combined css file you are either not successfully changing the respected .css path on the site
2. When your plugin automatically creates a new combined css file you are not successfully create the new file on the serverAgain: when purging the sg cache the site fully works normally (css combined files are successfully created on the server and linked in the site), which should mean it is not an issue from outside, but one which has directly todo with an error related to your plugin.
To verify: https://rebrand.ly/a0vd7wy
The problems you’re experiencing seem to be caused by CloudFlare. If you don’t need to use it explicitly I would recommend disabling it and using the Dynamic caching and all our other optimizations.
If you really need to use a CDN for global coverage, I’d recommend getting full page caching on CF and making sure you don’t duplicate any functionality like minification, combination, etc.
Last but not least, if any of the optimizations are not covering your particular site, you can either use the exclude functionality or disable that particular optimization alltogether. It’s not mandatory to have all of them enabled.
-
This reply was modified 5 years, 8 months ago by
Hristo Pandjarov.
@hristo-sg
Can you please elaborate on why this is happening? Disabling the functionalities is not an longterm option for us. For now we moved the minification to cloudflare caching, though combining the files is not an option I find with cloudflare.Can you come up with a workaround?
Duplication of functionality is generally a bad idea. If you’re doing minificaiton on CF’s side, don’t do it with the plugin. Same goes for all optimizations.
I would not use Cloudflare unless I really *need* a CDN. Since most probably you don’t have full page caching, your site would be slower for the visitors on the same continent than just using our Dynamic caching.
I am experiencing the same CSS 404 errors… It is happening every couple days on my site and we do not use Cloudflare for CDN due to issues with WebP images. Any fixes being made on the SG Optimizer side to resolve the combined CSS 404 errors? (https://www.apterainc.com/)
Hm…. Mine wasn’t solved yet!
Btw. there is a solution for the Cloudflare WebP image problem:
https://lookingfordaniel.medium.com/alert-cloudflare-may-break-your-siteground-website-without-you-noticing-44d089ab579dPlease do not highjack the thread. Open a new one with details about your issues and we will look into it.
-
This reply was modified 5 years, 8 months ago by
The topic ‘css 404 error’ is closed to new replies.