I am developing an HAProxy extension in Rust using the Lua API endpoints. The code presents an interstitial page unless the user has a cookie to pass it. This library is deployed in Docker alongside Redis for session management.
This works very well, except sometimes (after several hours of production use and never during testing even with simulated traffic), it starts presenting white pages and eventually 504 errors when the timeout is reached.
I would presume that this is the fault of the backend server, but it can be fixed by restarting the HAProxy Docker, implying that it is HAProxy’s fault. However, I never had this problem with HAProxy before (but I did not use Docker). Once the 504 error starts appearing, it does not go away until I restart Docker. I don’t think it’s the fault of the scripts because the interstitial page always works, even when the errors are being thrown.
I’m really at a loss at what it is. It’s hard to reproduce, only happens in production where there’s a time pressure to just restart it, and I’m not finding any valuable debugging information.
2 posts - 2 participants