7

Since some days, my website won't load on Safari nor Chrome on Mac OS X (at home nor on my clients computers). It's working well on Firefox (Mac OS & Windows) and IE / Edge, but not Chrome (Windows). It was well working before that and was not updated since weeks.

I'm facing this error on Safari

Failed to load resource: The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 303.)

And this one on Chrome

 Failed to load resource: net::ERR_SPDY_PROTOCOL_ERROR

It seem's to be related to HTTP/2 but I don't really know what is the problem.

I saw that a workaround is to clear the cache and cookie. I did and it works on Chrome the first time I load the website, but when I navigate to another page, the error appear again. I also flush opened socket without effects.

On Safari, flushing the cache and cookie has no effects.

My hoster (OVH) tells me that the problem is in my code but I cannot figure out where could be the bug.

Do you have any clue about that ?

Thanks a lot

Al3
  • 165
  • 1
  • 3
  • 10

4 Answers4

13

We have had a problem with nginx and HTTP/2 which resulted in the same error in Safari and a similar error in Internet Explorer.

When we tweaked the nginx buffers to be:

http2_max_field_size 16k;
http2_max_header_size 128k;

the issue was gone.

rid
  • 61,078
  • 31
  • 152
  • 193
uson1x
  • 407
  • 3
  • 16
  • Hi, thanks for the reply ! Unfortunaly, I don't have the hand on the hoster configurations. Moreover, they use Apache and not Nginx, so... – Al3 May 22 '18 at 08:04
  • It turns out that once the cookies get too large, the default `http2_max_header_size` is reached which causes the issue mentioned in the question. – sjagr Dec 14 '18 at 15:05
  • After hours of dead-end testing with Safari, this was our solution. Thank you so much! – theofanis Apr 03 '20 at 19:19
1

My problem was disappearing after reloading the page. So it always shows the error on the first load after nginx reload. Error log shown:

2018/10/21 06:26:54 [crit] 9439#9439: *54 open() "/var/cache/nginx/proxy_temp/2/01/0000000012" failed (13: Permission denied) while reading upstream, client: 37.9.113.93, server: anvileight.com, request: "GET /ar/ HTTP/1.1", upstream: "http://unix:/run/a8/gunicorn.sock:/ar/", host: "anvileight.com"

My problem was that nginx has directive:

user       deploy deploy;

and indeed, permissions on that folder were incorrect:

ll /var/cache/nginx/proxy_temp
total 40K
drwx------ 102 www-data www-data 4.0K Jan  6  2018 0
drwx------ 102 www-data www-data 4.0K Jan  6  2018 1

When I changed it to

user       www-data www-data;

problem has gone

Andrii Zarubin
  • 2,165
  • 1
  • 18
  • 31
0

The problem is a result of Safari holding too much local data for the site in question and failing to deal with that correctly. I use archive.org a lot so I had lots of LocalStorage and Cookie data for that site. The fact that this data is only in my main browser Safari and not in any of my other browsers explains why they could browse the site just fine.

So, the solution:

  1. Go into Safari > Preferences > Privacy
  2. Search for the affected domain name (for me this was "archive.org")
  3. Click Remove
  4. The problem goes away!

Here's a video showing the problem before and after: https://i.stack.imgur.com/gAFtv.jpg

Matt Sephton
  • 3,711
  • 4
  • 35
  • 46
  • 1
    Please don't add the [same answer to multiple questions](http://meta.stackexchange.com/questions/104227/is-it-acceptable-to-add-a-duplicate-answer-to-several-questions). Answer the best one and flag the rest as duplicates, once you earn enough reputation. If it is not a duplicate, tailor the post to the question and flag for undeletion. – Bhargav Rao Aug 11 '19 at 15:12
0

This suddenly started happening for me when the files were referenced on my local in a parent directory. Solution was to move to child directory.

Daniel
  • 505
  • 6
  • 8