502 bad gateway
vpai-grok
HOBBYOP

a year ago

getting 502 bad gateway

on first deployment it is not getting any kind of the issue but from last two days getting this error I do not know why facing that issue could please help me to find out the issue

Attachments

$10 Bounty

8 Replies

a year ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 12 months ago


smolpaw
HOBBY

a year ago

Could you check your logs for any errors that you see when you visit the website ?

Then post it here, this would help me debug the issue you are facing.


vpai-grok
HOBBYOP

a year ago

Starting Container

Jul 01 21:36:35

8b5f373e

resume_backend

--

d6b0ed20

🌍 ENV LOG: {

Jul 01 21:36:35

8b5f373e

resume_backend

--

d6b0ed20

NODE_ENV: 'production',

Jul 01 21:36:35

8b5f373e

resume_backend

--

d6b0ed20

FRONTEND_URL: 'https://resumefrontend-production-678e.up.railway.app';,

Jul 01 21:36:35

8b5f373e

resume_backend

--

d6b0ed20

SESSION_SECRET: 'SET',

Jul 01 21:36:35

8b5f373e

resume_backend

--

d6b0ed20

PORT: '5000',

Jul 01 21:36:35

8b5f373e

resume_backend

--

d6b0ed20

MONGODB_URL: 'SET'

Jul 01 21:36:35

8b5f373e

resume_backend

--

d6b0ed20

}

Jul 01 21:36:35

8b5f373e

resume_backend

--

d6b0ed20

Warning: connect.session() MemoryStore is not

Jul 01 21:36:35

8b5f373e

resume_backend

--

d6b0ed20

designed for a production environment, as it will leak

Jul 01 21:36:35

8b5f373e

resume_backend

--

d6b0ed20

memory, and will not scale past a single process.

Jul 01 21:36:35

8b5f373e

resume_backend

--

d6b0ed20

🔄 Connecting to MongoDB...

Jul 01 21:36:38

8b5f373e

resume_backend

--

d6b0ed20

MongoDB connected successfully

Jul 01 21:36:38

8b5f373e

resume_backend

--

d6b0ed20

Server running on 0.0.0.0:5000

Jul 01 21:36:38

8b5f373e

resume_backend

--

d6b0ed20

Environment: production

Jul 01 21:36:38

8b5f373e

resume_backend

--

d6b0ed20

Health check available at: http://0.0.0.0:5000/health

Jul 01 21:36:38

8b5f373e

resume_backend

--

d6b0ed20

🚀 Server is ready to accept connections

Jul 01 21:36:38

8b5f373e

resume_backend

--

d6b0ed20

Health check requested on /health

Jul 01 21:36:39

8b5f373e

resume_backend

--

d6b0ed20

Health check requested on /health

Jul 01 21:36:39

8b5f373e

resume_backend

--

d6b0ed20

Internal health check passed: 200

Jul 01 21:36:43

7decaf61

resume_backend

--

16242b39

Stopping Container

Jul 01 21:36:47

7decaf61

resume_backend

--

16242b39

🔄 SIGTERM received, shutting down gracefully...

Jul 01 21:36:47

7decaf61

resume_backend

--

16242b39

Server closed

Jul 01 21:36:47

7decaf61

resume_backend

--

16242b39

Session store closed

Jul 01 21:36:47

7decaf61

resume_backend

--

16242b39

MongoDB connection closed

see here the container is start but close automatically with out showing any error


teesh3rt
FREE

a year ago

might something be telling it to shut down? its shutting down to SIGTERM, which indicates that something might be telling it to shut down

quote from gnu.org:

Macro: intSIGTERM

The SIGTERM signal is a generic signal used to cause program termination. Unlike SIGKILL, this signal can be blocked, handled, and ignored. It is the normal way to politely ask a program to terminate.

The shell command kill generates SIGTERM by default.

also, where is this log coming from? could you provide some more information?


vpai-grok

Starting Container [Jul 01 21:36:35](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A35.833966752Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) 🌍 ENV LOG: { [Jul 01 21:36:35](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A35.833981239Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) NODE\_ENV: 'production', [Jul 01 21:36:35](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A35.833993585Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) FRONTEND\_URL: '<https://resumefrontend-production-678e.up.railway.app>['](https://resumefrontend-production-678e.up.railway.app'/);, [Jul 01 21:36:35](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A35.834004275Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) SESSION\_SECRET: 'SET', [Jul 01 21:36:35](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A35.834014789Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) PORT: '5000', [Jul 01 21:36:35](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A35.834025390Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) MONGODB\_URL: 'SET' [Jul 01 21:36:35](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A35.834034477Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) } [Jul 01 21:36:35](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A35.834048251Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) Warning: connect.session() MemoryStore is not [Jul 01 21:36:35](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A35.834061833Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) designed for a production environment, as it will leak [Jul 01 21:36:35](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A35.834073673Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) memory, and will not scale past a single process. [Jul 01 21:36:35](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A35.834084570Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) 🔄 Connecting to MongoDB... [Jul 01 21:36:38](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A38.072269697Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) MongoDB connected successfully [Jul 01 21:36:38](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A38.072305241Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) Server running on 0.0.0.0:5000 [Jul 01 21:36:38](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A38.072322852Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) Environment: production [Jul 01 21:36:38](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A38.072345067Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) Health check available at: <http://0.0.0.0:5000/health> [Jul 01 21:36:38](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A38.072362130Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) 🚀 Server is ready to accept connections [Jul 01 21:36:38](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A38.503313343Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) Health check requested on /health [Jul 01 21:36:39](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A39.078755586Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) Health check requested on /health [Jul 01 21:36:39](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A39.078772368Z) [8b5f373e](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A8b5f373e-75e7-46c5-bc0b-fdff26873bf5&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [d6b0ed20](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3Ad6b0ed20-1a5c-4353-8deb-1c770d6056a8&start=1751385310356) Internal health check passed: 200 [Jul 01 21:36:43](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A43.000000000Z) [7decaf61](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A7decaf61-e6bb-4f3b-a061-9126e0106c68&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [16242b39](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3A16242b39-167f-4a31-b707-840ab71943a9&start=1751385310356) Stopping Container [Jul 01 21:36:47](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A47.202566417Z) [7decaf61](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A7decaf61-e6bb-4f3b-a061-9126e0106c68&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [16242b39](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3A16242b39-167f-4a31-b707-840ab71943a9&start=1751385310356) 🔄 SIGTERM received, shutting down gracefully... [Jul 01 21:36:47](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A47.202585634Z) [7decaf61](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A7decaf61-e6bb-4f3b-a061-9126e0106c68&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [16242b39](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3A16242b39-167f-4a31-b707-840ab71943a9&start=1751385310356) Server closed [Jul 01 21:36:47](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A47.202601683Z) [7decaf61](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A7decaf61-e6bb-4f3b-a061-9126e0106c68&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [16242b39](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3A16242b39-167f-4a31-b707-840ab71943a9&start=1751385310356) Session store closed [Jul 01 21:36:47](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&context=2025-07-01T16%3A06%3A47.202616796Z) [7decaf61](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40deployment%3A7decaf61-e6bb-4f3b-a061-9126e0106c68&start=1751385310356) [resume\_backend](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40service%3A107c55c8-1e43-4a1f-947f-a21dda83062d&start=1751385310356) \-- [16242b39](https://railway.com/project/342528e9-1ad5-4a8a-8b70-0f233dd726e6/logs?environmentId=e8b47319-f317-4fcb-a031-53537be0a1b9&filter=%40replica%3A16242b39-167f-4a31-b707-840ab71943a9&start=1751385310356) MongoDB connection closed see here the container is start but close automatically with out showing any error

smolpaw
HOBBY

a year ago

My first thought looking at the logs was serverless mode, as it sends a SIGTERM, but the time difference doesn't make sense also the app is establishing an active connection with a db so serverless shouldn't work anyway i think.

The SIGTERM is being sent by railway i am confident in that. The issue is likely due to a misconfigured healthcheck as SIGTERM is sent right after it

Can you remove the healthcheck path from your deployment by going into your app Settings -> Healthcheck Path


teesh3rt
FREE

a year ago

EDIT 1:

timing looks off for it to be serverless, the railway wiki says:

"Inactivity is based on the detection of any outbound packets, which could include network requests, database connections, or even NTP. If no packets are sent from the service for over 10 minutes, the service is considered inactive."

that timing looks way shorter than 10 minutes, considering startup and shutdown all happen within the same minute

will update when i think of more stuff

EDIT 2:

is it possible that it might just be deployment teardown? dosent exactly make sense, but i found a mention of sigterm there.

"Once the new deployment is active, the previous deployment is sent a SIGTERM signal and given time to gracefully shutdown before being forcefully stopped with a SIGKILL."

EDIT 3:

if you could impliment a hook on SIGTERM, that could give us all more information


teesh3rt

EDIT 1: timing looks off for it to be serverless, the railway wiki says: "Inactivity is based on the detection of any outbound packets, which could include network requests, database connections, or even NTP. If no packets are sent from the service for over 10 minutes, the service is considered inactive." that timing looks way shorter than 10 minutes, considering startup and shutdown all happen within the same minute will update when i think of more stuff EDIT 2: is it possible that it might just be [deployment teardown](https://docs.railway.com/guides/deployment-teardown)? dosent exactly make sense, but i found a mention of sigterm there. "Once the new deployment is active, the previous deployment is sent a SIGTERM signal and given time to gracefully shutdown before being forcefully stopped with a SIGKILL." EDIT 3: if you could impliment a hook on SIGTERM, that could give us all more information

smolpaw
HOBBY

a year ago

You need to keep "502 bad gateway" into context. If it's a new deployment then app should respond still.

It's not just about SIGTERM here. That is just a clue.


teesh3rt
FREE

a year ago

"The HTTP 502 Bad Gatewayserver error response status code indicates that a server was acting as a gateway or proxy and that it received an invalid response from the upstream server.

This response is similar to a 500 Internal Server Error response in the sense that it is a generic "catch-call" for server errors. The difference is that it is specific to the point in the request chain that the error has occurred. If the origin server sends a valid HTTP error response to the gateway, the response should be passed on to the client instead of a 502 to make the failure reason transparent. If the proxy or gateway did not receive any HTTP response from the origin, it instead sends a 504 Gateway Timeout to the client."

Common causes:

  • Backend server is down or unreachable
  • Backend server crashed or timed out
  • Network issues between proxy and backend
  • Misconfigured proxy or load balancer
  • Backend server returned invalid or malformed response

smolpaw
HOBBY

a year ago

not to be rude but let's focus on solving the issue instead of explaining it using chatgpt


Welcome!

Sign in to your Railway account to join the conversation.

Loading...