question

QuanVanMai-2303 avatar image
2 Votes"
QuanVanMai-2303 asked SpilmontErwan-0029 answered

Browsers download incomplete file from Azure CDN

Recently, I have encountered a problem with Azure CDN. Occasionally, browsers download incomplete files that are cached in Azure CDN.
That leads to our web page is being displayed correctly or shown as blank page.
We have checked the browser's console, and it is "Uncaught SyntaxError: Invalid or unexpected token".
It seems like the browsers cannot compile the javascript files returned from CDN.

Every time the issue happens, we cannot do anything but purge all cached files in the CDN, and it disappears.

For more information:
- We are using Angular 5 and our web page is hosted in an Azure Web Service.
- We are using Azure CDN from Microsoft.
- Optimization strategy is "General web delivery". It is the only option in our subscription.
- When the problem occurs, it happens for all new users in the same region who try to access our Web app while people in other regions are still accessing it fine.
- We must purge all caches files in the CDN to solve it "temporarily".

Has anyone run into this issue?

Thanks

azure-cdn
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SaiKishor-MSFT avatar image
1 Vote"
SaiKishor-MSFT answered

@QuanVanMai-2303 Apologize for the delay in response to your question.
Looks like this issue may be due to large file transfers. We don't have any limit on large files but to achieve this we need to implement object chunking-https://docs.microsoft.com/en-us/azure/cdn/cdn-large-file-optimization. Please let me know if this helps. Thank you!

· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@QuanVanMai-2303 Any update on this issue? Thank you!

0 Votes 0 ·

Hi @SaiKishor-MSFT, my apology for the late response.
I've just come back from my holiday.

I have checked the link you've sent. However, it does not help much since all of our files are under 5 MB.

For more information:
- We are using Azure CDN from Microsoft.
- Optimization strategy is "General web delivery". It is the only option in our subscription.
- When the problem occurs, it happens for all new users in the same region who try to access our Web app while people in other regions are still accessing it fine.
- We must purge all caches files in the CDN to solve it "temporarily".

Thank you very much

0 Votes 0 ·

@QuanVanMai-2303 Do you see this happen to a specific type of file or all files and any specific region?

0 Votes 0 ·
Show more comments
dmarlow avatar image
1 Vote"
dmarlow answered

We too have been seeing this with the Azure/Microsoft CDN. Here's what Azure support and respective "backend team" were able to discover:

When the first byte of the response is fetched from the Parent cache we were seeing this Issue, Our backend team Recovered the parent cache having system failures.
Currently issue is mitigated and we are still waiting for an RCA, Once I have any update will share with you.


We have several Verizon CDN endpoints and haven't seen this issue ever.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

alohaninja avatar image
0 Votes"
alohaninja answered alohaninja edited

We just witnessed this same behavior multiple times this week using Premium Verizon CDN - it's not related to app deployments or file size (<1MB).

The edge pops cache a 0 content length payload in specific regions. When navigating to the resource in chrome it downloads the file (content-type is incorrectly set to application/octet-stream) of 0 bytes. The only solution is to purge the profile which forces a re-validation to the origin and the situation is resolved.

This does not seem to be caused by origin timeouts or errors - we have no data logs corresponding to the outage timelines.

We are considering migrating to another CDN provider - there is nothing our app is doing improperly. We are testing shortening our TTL from 10m to 5m to see if the situation improves.



Update - we did find a route config that was responding with 0 byte 200 which the CDN was caching - this was a bug in our routing proxy, not the CDN or the app. Good luck to others!

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SpilmontErwan-0029 avatar image
2 Votes"
SpilmontErwan-0029 answered

Hello,

Do you have any updates concerning that issue?

We have exactly the same problem as QuanVanMai-2303: we experience 404 and uncomplete download of the ressources stored onto the CDN.
It translates to a blank page on our frontend and it appears pretty much randomly on any geographic location.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.