Global compression disable?

We are debugging a problem in our environment where we’re occasionally getting an ERR_CONTENT_DECODING_FAILED message from services. It is always cached services that cause the error. The same service can work 10 times in a row and fail the 11th time.

As a way to help us debug, is there a way to turn off compression on cached services globally? I know you added NoCompression = true to the [CacheResponse] attribute, I was wondering if there was an global equivalent (when Initializing the cache, perhaps).

thank you,
Matt Tag

No, the [CacheResponse] attribute wont work without the HttpCacheFeature plugin which you can remove but it will throw an Exception saying it needs to be enabled for it to work, i.e. it wont fail silently.

I’ve just added support for this option in this commit where in the next version you’ll be able to disable all HTTP Caching with:

GetPlugin<HttpCacheFeature>.DisableCaching = true;

Although if you’re only on v5.8, this issue may already be resolved by upgrading to the latest v5.8.1 on MyGet which resolved an issue with writing async streams which could potentially cause this issue.

Are you saying that the async stream issue you resolved might be the source of my ERR_CONTENT_DECODING_FAILED troubles?

It could potentially resolve the issue, won’t know for sure without a stand-alone repro I could test it on.

I deployed 5.8.1 to my beta server, and the results look promising. Have not seen the ERR_CONTENT_DECODING_FAILED error yet.

1 Like

@taglius This looks like a variant of the issue I had (which 5.8.1) solved:

1 Like