4 months ago
I am experiencing a persistent deployment timeout issue with my Python FastAPI service in project attached. The build process appears to complete successfully, but the deployment fails consistently with a 5-minute timeout. Based on the logs, the failure occurs during the final step of uploading the built Docker image to the Railway registry.
Summary of the Issue:
Service: Python (v3.11) FastAPI application.
Region: europe-west4
Problem: The deployment process times out after exactly 5 minutes.
Point of Failure (from logs): The process hangs and eventually fails during the "importing to docker" or image upload phase. This step seems to take longer than the allowed 5 minutes.
Troubleshooting Steps Already Taken:
Reduced Dependencies: I have already minimized the packages in requirements.txt to reduce the final image size.
Switched Builders: I initially used Nixpacks and encountered the same timeout. I have since switched to Railpack, but the issue persists.
Logs:
Here is a snippet from my latest deployment attempt using Railpack, which shows the build succeeding before the timeout:
[Region: europe-west4]
╭────────────────╮
│ Railpack 0.2.1 │
╰────────────────╯
↳ Detected Python
↳ Using pip
Packages
──────────
python │ 3.11.13 │ railpack default (3.11)
Steps
──────────
▸ install
$ python -m venv /app/.venv
$ pip install -r requirements.txt
Deploy
──────────
$ python main.py
Successfully prepared Railpack plan for build
... (build steps complete successfully) ...
copy ., /app/.venv, /app
Cached
[railpack] merge ghcr.io/railwayapp/railpack-runtime:latest, $packages:mise, $build, $build
Cached
importing to docker
42s <-- Note: This was a cached run. Uncached runs take > 5 minutes and time out.
[auth] sharing credentials for production-europe-west4-drams3a.railway-registry.com
0ms
<-- The process hangs here until it times out. -->Specific Questions
Is it possible to increase the deployment timeout period for my project?
Is the 5-minute timeout a hard limit, particularly for users on the free plan?
Given that the build is successful, is there a recommended strategy to optimize the image upload step from the europe-west4 region to prevent this timeout?
Thank you for your help. Below are my project's dependencies for your review.
requirements.txt
fastapi
uvicorn[standard]
transformers
torch3 Replies
4 months ago
Hey there! We've found the following might help you get unblocked faster:
🧵 Urgent: Deployment Failure on Railway (Nixpacks + Node.js 22) - Need Help Debugging
🧵 Cannot connect to Redis via private network in Docker build step
If you find the answer from one of these, please let us know by solving the thread!
Railway
Hey there! We've found the following might help you get unblocked faster: - [📚 Configure Healthchecks](https://docs.railway.com/guides/healthchecks) - [🧵 Recent change to Railway to cause app cron or ENV issues?](https://station.railway.com/questions/recent-change-to-railway-to-cause-app-cr-33c2ab4d) - [🧵 Urgent: Deployment Failure on Railway (Nixpacks + Node.js 22) - Need Help Debugging](https://station.railway.com/questions/urgent-deployment-failure-on-railway-n-6ba0ec2e) - [🧵 Cannot connect to Redis via private network in Docker build step](https://station.railway.com/questions/cannot-connect-to-redis-via-private-netw-9d16cbf7) If you find the answer from one of these, please let us know by solving the thread!
4 months ago
No resolution
4 months 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 itsrems • 4 months ago
4 months ago
What's the size of your Docker image?