Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
1.9k views
by Rookie

I'm getting this on some resources and it's preventing us from editing pages on the back end. I found the error in console in firefox:

by Rookie

I talked to someone who helped me further. We explored the nginx log and found some issues:

2019/02/17 00:38:05 [alert] 2459#2459: *46471 pread() read only 8553 of 8563 from "/var/www/domain.com/htdocs/wp-content/uploads/bb-plugin/cache/18-layout-preview.css" while sending response to client, client: 172.58.22.150, server: domain.com, request: "GET /wp-content/uploads/bb-plugin/cache/18-layout-preview.css?ver=4d453a398eb115bac296bd8be6f5cfb9 HTTP/2.0", host: "domain.com", referrer: "https://domain.com/?fl_builder"

We searched for "search pread() read only xxxx of yyyy" and this led us to look at the nginx config file. My friend, who is an nginx expert and runs a hosting company, compared the file with one of his, and we ended up commenting out three lines in the webinoly config file that were not present in his setup:

31:     #open_file_cache_valid 3m;
32:     #open_file_cache max=129485 inactive=5m;
69:     #open_log_file_cache max=1000 inactive=30s valid=1m;

In my other webinoly server, one of the lines was slightly different:

32:    #open_file_cache max=245817 inactive=5m;

This appears to have solved the problem. I haven't seen the errors I was having since then. I wonder what these lines are there for, or how they're generated, or why they differ across two servers?

Hope this is helpful to someone!

1 Answer

0 votes
by Expert
Tell me, did you try to fix it before come here?

What did you find in Google about this topic?
by Rookie
Hi,

Yes, I spent quite some time trying to learn about it. It seems to be a little bit complicated, related to the server or nginx. The error is not consistent, only happening sometimes. It seems that most people said it was related to not enough space on the drive (I have plenty of space, though). This is the most comprehensive answer, from stack exchange:

https://stackoverflow.com/questions/33867014/what-does-err-spdy-protocol-error-mean-in-nginx

There seems to be many possible causes, and I thought maybe it was something someone here has knowledge of -- maybe a fix on the server would help solve this issue, which I haven't had in the past.
by Expert
Most of the times is not related to the server or nginx, as you said. The main reason is due to people using outdated browsers that doesn't support modern protocols. But, as you said, there are to many possible causes.
by Rookie
We have the latest version of Firefox. Well, we'll see how it goes moving forward. Thanks for the help as always.
by Expert
If you find a solution, please share it here, so other members can read about it.

Regards.
by Rookie
Still no luck finding an answer that is consistent -- it can be not enough disk space, malformed headers, http2 settings -- I couldn't make it work. My user was using Beaver Builder and she could not edit pages some of the time. The errors were happening randomly, sometimes not.

This error occurred on both of my Webinoly servers at different providers (Google Cloud and Hetzner).

I moved her site to another host and it works perfectly now.

I really want to find out what is causing this, so I can trust my server is functioning properly, so hoping someone has some info on this.
by Rookie
Hi sshanky,

I was wondering if you ever found out more about this problem? I am getting the same error sometimes when I update a child theme CSS file. I think it happens when the file is cached by nginx and then the file gets modified while still in the cache.

I'm wondering if I should just comment out those 3 lines to disable the file cache or if there is a better solution.
by Rookie
I haven't seen this again since then. No further information has been learned on my end, but if you come across anything useful please post it here!
by Expert
Not sure, but maybe it's related to the OCSP must-staple option that is enabled by default in Webinoly. It's documented that it can cause problems in Firefox.
by Rookie

This problem has nothing to do with Firefox or OCSP staple. However, I think the OCSP must-staple is the cause of another problem reported here. If you restart NGINX then the first time the site is loaded in Firefox it will fail, then it will load successfully after the first time until the next time you restart NGINX. I solved that problem by putting my site behind a CDN so Firefox browser is not directly accessing the site.

The problem in this thread is caused by the open_file_cache directive in nginx.conf. If a file in the cache is modified, that file will not load until it's re-validated. This can take up to 3 minutes because of your setting open_file_cache_valid to 3 minutes. The edited file will not load in any browser during this time.

As mentioned in my other thread, I have been able to reproduce this error by making sure a child theme CSS would be in the file cache and then quickly modifying the file through the theme editor.

I would suggest looking into lowering this value. I have seen 20 seconds as a common value on various guides. Even better would be to add an option to webinoly to change the open_file_cache and open_file_cache_valid parameters (disable, enable, adjust valid time, adjust inactive time, and open_file_cache_min_uses).

Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...