-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non standalone version starts returning 504 error and requires restart #10
Comments
@jpmckinney I think we've tracked down the problem thanks to your hint about increasing the It seems that occasionally, for whatever reason, a request to the image-proxy is closed before it has completed. This appears to fill up the
As you can see, the requests that are closed before completion aren't removed from the sockets array for the I found the solution here - nodejs/node-v0.x-archive#6227 (comment), basically So this commit - mysociety@5e304b5 - solves the unclosed socket issue, hooray!. However there are two issues that I am having trouble resolving:
|
I've added the commit for now. I haven't been able to reproduce the imagemagick error. |
I've just pushed an alternate solution that simply doesn't use connection pooling, like substack's hyperquest library, to get around the maxSockets growth/limit. The |
@jpmckinney Ah that looks promising, thanks! I've deployed the latest master of image-proxy to popit production. I'll monitor it until the end of the week and let you know if we encounter any further issues. |
Sounds good. I'll close this issue, but can re-open if the error isn't resolved. |
If there are no issues by the end of the week, let me know, and I'll release 0.0.3. |
@jpmckinney We've had no further issues, so I think you're clear to release 0.0.3. Thanks! |
Thanks - it's released! |
See mysociety/popit#719 for some details on the original site.
This doesn't happen immediately but after a while the proxy starts returning 504 errors and then continues to do so until the node process is restarted.
This only seems to happen for images that are hosted on the same app as the proxy is included in so I'm assuming it's something in the interaction that's causing this. The images are served fine when not called via the proxy.
I'm mostly raising this in case someone else has come across similar behaviour.
The text was updated successfully, but these errors were encountered: