Service instability – slow performance and frequent 502/499 errors
gadatos
PROOP

2 months ago

Hello,

I would like to report an issue with the service. Currently, everything is running very slowly, and we are experiencing frequent errors — mainly 502 and 499. It is unclear what is causing these problems.

The issue occurs consistently and significantly affects our work. Could you please investigate and let us know what might be the cause and when we can expect a resolution?

I can provide additional details if needed.

Best regards,

Solved

8 Replies

gadatos
PROOP

2 months ago

i have error on postgresql 2026-03-18 08:15:56.455 UTC [51555] ERROR: could not resize shared memory segment "/PostgreSQL.243058984" to 16777216 bytes: No space left on device


sam-a
EMPLOYEE

2 months ago

The PostgreSQL error you shared - "could not resize shared memory segment: No space left on device" - is caused by the default shared memory (SHM) size being too small. The default is 64MB. You can increase it by adding the RAILWAY_SHM_SIZE_BYTES variable to your PostgreSQL service's environment variables. For example, to set it to 256MB, use the value 268435456. After adding the variable, redeploy your PostgreSQL service. This is very likely the cause of your slow performance and 502/499 errors, as PostgreSQL cannot function properly when it runs out of shared memory. More details here: PostgreSQL docs.


Status changed to Awaiting User Response Railway 2 months ago


haayhappen
PRO

2 months ago


Status changed to Awaiting Railway Response Railway 2 months ago


valeriocmw
PRO

2 months ago

I also have a lot of 499 errors by 12:20 CET


gadatos
PROOP

2 months ago

still problem


Hey, in addition to the SHM sizing that Sam mentioned above, we also identified elevated connections on a single machine in our infrastructure that was contributing to the 502/499 errors around this timeframe. That infrastructure issue has been resolved. If you're still experiencing issues after increasing the SHM size and redeploying, please let us know.


Status changed to Awaiting User Response Railway 2 months ago


theelioproject
HOBBY

2 months ago

@angelo-railway this is still an issue.


Status changed to Awaiting Railway Response Railway 2 months ago


theelioproject

@angelo-railway this is still an issue.

chandrika
EMPLOYEE

2 months ago

Hi all, the infrastructure disruption Angelo mentioned has been resolved but anyone here is still running into the 502/499 errors, could you please try the SHM fix Sam described? (add RAILWAY_SHM_SIZE_BYTES=268435456 to your Postgres service and redeploy)

If that still doesn't fix it, please open a thread with your project link and we'll look into it!


Status changed to Awaiting User Response Railway 2 months ago


Railway
BOT

2 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway about 2 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...