2 months ago
I currently have a setup where I have a Wordpress site that I deploy to with docker. I inject a healthcheck.html page into my container once wordpress is all set up and this is what my Railway healthcheck calls.
In the brief period when the setup script is complete but before Railway has verified the new container as healthy, all requests just get a 502 error. Seemingly requests are routing to the old container that has apparently been killed by Railway before the new one is healthy.
If I wait a few seconds once this healthcheck has passed it correctly switches over to the new container. Is this a Railway problem or is it something I'm doing wrong?
I feel like Railway is just jumping the gun on the shutdown and should wait until the new one is healthy but I figured that was the default behaviour?
16 Replies
2 months ago
Deploy your service with teardown enabled, and then deploy again to see if it works
I have, still same issue, as soon as it gets to the healthcheck stage it 502s until it fully switches
2 months ago
Because you have a volume.
okay so I'll just have to time my deployments to minimise my users getting 502 errors
2 months ago
Or move the storage layer to a bucket.
Actually I only serve media from my volume so yes that makes sense let me try that 🙌🏿
2 months ago
Railway has buckets
2 months ago
(no markdown available for this content)
2 months ago
Depends on what you do, if it's media like you said, then no
2 months ago
Railway uses Tigris for buckets! And Tigris is fastttt