Search code examples
debuggingbrowserprotocolsspdy

How to debug SPDY_PROTOCOL_ERROR?


In legacy application hosted in Amazon AWS we are getting SPDY_PROTOCOL_ERROR for a certain page. This happens in Google Chrome and Opera, but in Firefox the page loads normally. According to https://en.wikipedia.org/wiki/SPDY the SPDY implementations in Chromium and Firefox might be a bit different, in Chromium the error occurs anyway. The problem is not happening within the same webpage in the local development environment.

After doing some research via Google I did still not find a good answer on how to debug this (from a developers or server administrators perspective). What can I do to identify the source of this problem?


Solution

  • The problem turned out to be caused by zlib output compression setting in AWS. After disabling this setting all worked again. Chances are that the server was sending invalid content length headers for some special pages which is not accepted by Chrome and Opera.

    There is some discussion about this in the Cloudflare support forums: https://community.cloudflare.com/t/community-tip-fixing-err-spdy-protocol-error/71356

    Here is the answer from the Cloudflare community:

    Error

    Try the suggestions in this Community Tip to help you fix ERR SPDY PROTOCOL ERROR when visiting a site.

    Background

    The Error ERR_SPDY_PROTOCOL_ERROR while visiting a site indicates a network error that is preventing the page from loading. If you’ve restarted your browser, updated Google Chrome, tried in incognito mode, and flushed and renewed your IP, try the Quick Fix Idea below to address the issue.

    Quick Fix Ideas

    1. If you are not the site owner, contact the site owner and let them know you are having issues accessing their site.

    2. Short term, change your :orange: to :grey: which would bypass Cloudflare. This is not optimal, but would fix the problem in the short term by taking Cloudflare out of the mix for anything but simple DNS resolution.

    3. There is a mismatch between the Content-Length header you are sending and the actual content-length.

    4. Fix your origin response headers. For Apache, review this 18. If you’re using a hosting service, please contact your hosting provider to make this change for you.

    5. Upgrade to Pro in order to disable http/2.