webp-sh / webp_server_go

Go version of WebP Server. A tool that will serve your JPG/PNG/BMP/SVGs as WebP/AVIF format with compression, on-the-fly.

Home Page:https://docs.webp.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The server will generate empty WebP cache under certain unexpected circumstances

JerrySukin opened this issue · comments

commented

Describe the bug
In some cases, perhaps due to network problems or storage backend issues, the server will generate a 0KB empty webp cache, but with a normal file name, then the server will keep serve this error cache.
When I found out, I deleted the cache and the server would regenerate the correct one, then everything was fine.
This error often occurs on my server, and given that there should be no empty files under normal circumstances, is it possible to regenerate the cache when an empty WebP cache is read?

Environment (please complete the following information):

  • OS: CentOS 7
  • version 0.4.7 with remote backend

Screenshots and logs
I didn't get the logs when the error cache was made, but the logs afterwards were like normal files without errors.

Thank you for your feedback and your sponsor ❤️!

network problems or storage backend issues

Can I understand that you're using Remote Backend mode in your case, if this is the case, could you please provide some more information on your backend and the network between WebP Server and backend?

  • How will the backend respond when directly visiting it (Headers, Response time, etc)?
  • Is WebP Server in another country than you backend?
commented

I have a server in Seattle that has nginx and webp server running on it, and the original images stored in Backblaze B2 Cloud object storage in California.
To reduce API requests, I use an nginx reverse proxy between webp server and object storage, which has an one hour cache.
Object storage has some common S3 headers and typically has a response time of around 600 ms, but peaks can go to 5 seconds or even 15, and sometimes the request fails.

We've released WebP Server Go 0.4.9, please have a try and see if this problem still exists.

commented

Thank you, I will keep watching.