Small % of 500 errors logged in Cache Analytics but 0 Errors in Workers/Pages metrics

Hi all! We have a very basic Worker proxying a Pages project (to use CF for SaaS) and everything works great. However, yesterday during a (very loose) stress test of a certain workflow, we've seen ~66 requests out of 15k fail with status code 500. 1. Zone > Cache analytics (<zone>/caching?status-code=500) shows the errors https://share.cleanshot.com/B1YVRcRp 2. Zone > Workers Route also shows the same errors (<zone>/caching?status-code=500) https://share.cleanshot.com/VdL4W6G2 3. Workers & Pages > Workers (the simple proxy) however shows 0 errors during the time (/workers/services/view/nyla-site-proxy/production) https://share.cleanshot.com/s0SjL9hC 4. Workers & Pages > Pages analytics also shows 0 errors (pages/view/<pages-project-name>/analytics/production) https://share.cleanshot.com/58Bz9w2Z Oddly enough, Worker Trace Events is configured on the simple proxy and I do see those requests in our logs (https://share.cleanshot.com/vZvDRPy7). The only hint of what's the error category is that the Pages project does show this in the real time logs area (https://share.cleanshot.com/F9TfKGq1) - but why would it not appear as an Error under metrics? 🤔 Is there any easy way to detect who's swallowing the error/more information? Not seeing any odd firewall events/threats (e.g. no sign this was a blocked request due to misdetection). The zone also has basically nothing besides this setup. Thanks!
4 Replies
Walshy
Walshy•9mo ago
If you have a plan that entitles support, this is probably best handled in a ticket. It could be one of many many systems and would need some investigation to find out which (along with probably some more logging, tracing, etc.)
juanferreras
juanferrerasOP•9mo ago
thanks for the response Walshy! The Zone's on Pro so we do have ticketing, thanks for that shout. I'm not really concerned on the specific error here JFYI but wanted to get thoughts on better ways to debug this in the future / if it would be expected that either should have logged somewhere or those charts are a best-effort. We're pending putting Sentry on the Pages project which I'm guessing would have surfaced the error to us
Walshy
Walshy•9mo ago
but why would it not appear as an Error under metrics? 🤔
One thing I'll call out is that if you're doing a try-catch, that's why. "Error" is specificially uncaught exceptions, if you're catching and returning a 500 yourself, this will show as an "ok" (since, the Worker itself did execute properly)
Oddly enough, Worker Trace Events is configured on the simple proxy and I do see those requests in our logs (https://share.cleanshot.com/vZvDRPy7).
Same thing here, if you're doing a try-catch and not logging the error happening, you essentially would swallow it
juanferreras
juanferrerasOP•9mo ago
ah! that's exactly what's going on. I didn't realize Error meant unhandled, but thought it was status-code based. That solves it, thanks so much, Walshy!
Want results from more Discord servers?
Add your server