I do some maths in my django app on railway. It's complicated, and CPU bound. I have the current Developer account (the $5 one).
The maths fails once deployed on some runs with this error:
[2023-06-05 14:02:41 +0000] [74] [CRITICAL] WORKER TIMEOUT (pid:140)
[2023-06-05 14:02:41 +0000] [140] [INFO] Worker exiting (pid: 140)
[2023-06-05 14:02:42 +0000] [74] [WARNING] Worker with pid 140 was terminated due to signal 9
Similar to this SO
I'm not doing anything smart right now like managing workers, async things or using specific multi-threading libs.
I'm not sure how to solve this issue (without further reducing the data set size, which is already as small as possible). I currently have 2 possible ideas:
- Follow the advice on the SO, to increase the allocated worker memory
- Add a FastAPI service to the railway deployment and somehow offload the process to there
Can anyone share any suggestions to solve this, or assess the likelyhood of either of my plans working?