#1 by whataguy
As an alternative to Heroku I use Railway to deploy my oTree application. Everything works like a charm - however, I sometimes receive a 502 Bad Gateway Error ("failed to forward request to upstrean: connection closed unexepectedly"). It only happens infrequently and only when I click through the experiment manually: So far, it never happened with browser bots. If I reload the page, I can continue the experiment as if nothing happened. For obvious reasons this is no solution for running the experiment in the field. See the attachments below for an example screenshot of the error and the HTTP Logs. I am asking the question here as a last resort as I feel like I searched the entire internet at this point without finding a solution. Would be so grateful for a solution or even just a nudge into the right direction.. My current train of thought: I feel like it happens when I submit pages very fast in succession - this would explain why browser bots have no problem as they only submit the page once. Maybe the server cannot handle multiple similiar requests at the same time? Maybe, therefore, I need to changes some configuration on how requests are handled..?
#2 by whataguy
Quick Update: I also got the same error on a browser bot now. Interestingly, I cannot find it in the HTTP logs