HTTP/2 Origin Trap: Cache Invalidated, Website Crashes Instantly?!

EdgeOne has a high threshold for use, and here we go again with an error: ERR_EMPTY_RESPONSE

HTTP/2 Origin Trap: Cache Invalidated, Website Crashes Instantly?!

I asked the large model, but it couldn’t clarify the reason.

HTTP/2 Origin Trap: Cache Invalidated, Website Crashes Instantly?!

Submitted a ticket, and then this issue was resolved.

The ERR_EMPTY_RESPONSE error usually indicates that the client (such as a browser or network request tool) did not receive any response when attempting to connect to the server; in the above configuration, this leads to a failure in origin fetching (the origin server does not support HTTP/2 responses and will directly close the connection and send a reset); the EO node will also not return data to the client, hence this error message.

To summarize, the reason for the error is: the origin server does not support HTTP/2, but HTTP/2 origin fetching is enabled in EdgeOne.

HTTP/2 Origin Trap: Cache Invalidated, Website Crashes Instantly?!

When the cache on EO expires, an error will occur during origin fetching.

Solution:

Simply disable HTTP/2 origin fetching on EdgeOne.

HTTP/2 Origin Trap: Cache Invalidated, Website Crashes Instantly?!

Enabling HTTP/2 origin fetching can lead to origin fetching failures (the origin server does not support HTTP/2 responses and will directly close the connection and send a reset);

the EO node will also not return data to the client, hence this error message.

Why is the error being discovered now, when it was normal before?

Initially, there was no error because the homepage had already been cached by EdgeOne, with a default cache duration of 2 hours.

HTTP/2 Origin Trap: Cache Invalidated, Website Crashes Instantly?!HTTP/2 Origin Trap: Cache Invalidated, Website Crashes Instantly?!

EdgeOne content caching rules

https://cloud.tencent.com/document/product/1552/87651

Default caching strategy: Follow EdgeOne’s default caching strategy, which determines the file’s cache duration at the node based on the Cache-Control and other caching headers in the HTTP response.

HTTP/2 Origin Trap: Cache Invalidated, Website Crashes Instantly?!

Node cache TTL

https://cloud.tencent.com/document/product/1552/70777

Clear cache (refresh cache)

https://cloud.tencent.com/document/product/1552/70759

HTTP/2 Origin Trap: Cache Invalidated, Website Crashes Instantly?!

After clearing, when users access resources, since there is no cached resource on the node, it can only fetch from the origin, which will temporarily increase the number of origin requests and weaken the acceleration effect. If a large number of cached resources are cleared, it will generate many origin requests, putting some pressure on the origin server.

HTTP/2 Origin Trap: Cache Invalidated, Website Crashes Instantly?!

“What users need is an answer,” not a process, not information, not knowledge.

To address this issue, one could also find a solution by flipping through the documentation.

However, it feels cumbersome, and one may not want to look it up.

This might be where AI has an opportunity.

Leave a Comment