502 Error During Cold Start of My Rails Application

vakaramokoPRO

8 months ago

Hello,

I am encountering a 502 error with my application during cold starts. Here are the details:

  • Framework: Rails 7

  • Database: PostgreSQL

  • Issue: The 502 error appears when there is a first visit to the application after a period of inactivity (when the app is in sleep mode). The initial loading time seems to cause this error before the app is fully ready to respond.

I have checked the logs but haven't found any clear indications. Could you please let me know if there is a solution to prevent this error or configure a longer timeout for the application to be ready before receiving a request?

Thank you in advance for your help.

Solved

5 Replies

vakaramokoPRO

8 months ago

the screenshort

Attachments


chandrikaEMPLOYEE

8 months ago

Hi there , this issue is slotted into our backlog to work on but currently you should be able to temporarily work around this by either switching to the legacy runtime or disabling application sleeping.


Status changed to Awaiting User Response railway[bot] 8 months ago


btnalexandreFREE

7 months ago

Hi there , this issue is slotted into our backlog to work on but currently you should be able to temporarily work around this by either switching to the legacy runtime or disabling application sleeping.

Hello @chandrika do you have news for your workaround on 502 error for sleepy apps ?


Status changed to Awaiting Railway Response railway[bot] 7 months ago


7 months ago

We don't currently have an update on this issue, the current solution although not ideal, would be to disable app sleeping.


Status changed to Awaiting User Response railway[bot] 7 months ago


6 months ago

Hello all!

We've resolved an issue where apps with longer startup times were showing 502 errors. Apps now have up to 10 seconds to start accepting traffic, thus preventing these error pages from appearing.

You will need to trigger a deployment so that the changes we have made take effect.


Status changed to Solved brody 6 months ago