kotx / render

Cloudflare Worker to proxy and cache requests to R2
MIT License
384 stars 85 forks source link

site showing errors always in the first requests to a file #8

Closed Douglasgomestosta closed 2 years ago

Douglasgomestosta commented 2 years ago

I installed the code in a worker so that I could display mainly images, unfortunately the script always presents errors in the first requests of some files, after a few attempts the photo is displayed to the user

first try: Captura de tela de 2022-06-03 18-05-25

Captura de tela de 2022-06-03 18-04-07

after I reload the page a few times: Captura de tela de 2022-06-03 18-04-15

after I reload the page a few times, the first image is displayed but the others keep showing error:

Captura de tela de 2022-06-03 18-09-46

the workers panel:

Captura de tela de 2022-06-03 18-12-59

this error seems to be occasional, there are photos that load without problems, others that don't load on the first try and some load only after I reload the pages many times, at first I thought it could be a problem with Cloudflare R2 but I didn't find any problem in the status page.

kotx commented 2 years ago

Thanks for the report! Debugging may be hard if it's only an occasional issue, but we can try.

First, can you try clearing the cache for the entire zone (seems to be socialfan.app from the screenshot) from the Cloudflare dashboard and seeing if requesting the same file reproduces the error?

You can stream logs from the worker to view the exceptions as they come in: image

kotx commented 2 years ago

@Douglasgomestosta Hey, just checking, have you had any luck with this issue?

kotx commented 2 years ago

Hey, it's been a while and I've never had this happen. If anybody runs into this issue just add a comment and I'll reopen it.