Is sharp the culprit?

I didn't actually do the tutorial worksheet and I don't actually have an interesting writeup for you lolololol.

I did manage to play with Bibliogram and get a new feature out, which adds a button to the settings page that actually takes you back to where you were, but I haven't managed to solve the request timeout problem.

Instagram does not seem to rate limit access to its images, which is great news for me. I thought that picture rate limiting might be something to do with the issues, but as far as I can tell, that isn't the case.

The only real thing I know is this: If Bibliogram does not proxy images, then this issue does not happen.

However, I don't think the issue is just the proxy code. When I try spamming requests for images at localhost, it seems to do it just fine.

I haven't tried requests for videos, but I assume it would be the same behaviour, since those are likewise passed through without modification.

The problem seems to be with how sharp resizes the images, because when I spammed requests for resized images at localhost, occasionally it would get stuck for several seconds and not serve any requests, and then after a moment it would continue to serve requests as before.

I've put a branch up on GitHub called "gm" which uses the old GraphicsMagick code instead of sharp to resize. Next time the problem hits bibliogram.art, I'll switch to the gm branch and see if that is affected as well.

— Cadence

← Previous: Class grindNext: HTTP headers →