rontend Deployment Consistently Failing with 502 "Application failed to respond" Despite Multiple Configuration Attempts
gonenha
PROOP
3 months ago
Dear Support Team,
I'm experiencing persistent deployment issues with my frontend service that consistently fails with a 502 "Application failed to respond" error, despite trying multiple configuration approaches and following Railway documentation recommendations.
Project Details
- Project: FormFlowAI-Clean
- Environment: production
- Frontend Service URL: https://frontend-production-ed93.up.railway.app
- Backend Service URL: https://radiant-charm-production-199d.up.railway.app (working perfectly)
Problem Description
The frontend service consistently returns a 502 error with the message "Application failed to respond" for all endpoints, including health checks. This occurs despite the application building successfully and the same code working perfectly in local development.
Backend Context (Working Successfully)
Interestingly, our NestJS backend service on the same Railway project works flawlessly after we resolved an IPv6 binding issue by changing from `0.0.0.0` to `::` as documented in your v2 runtime guidance.
Questions
1. IPv6 Requirement: Should frontend static sites also use `::` binding like our working backend, or is this specific to certain application types?
2. Health Check Configuration*: Are there specific requirements for static site health checks that differ from API services?
3. Nixpacks vs Dockerfile: Would switching to a Dockerfile-based deployment resolve this issue? We have a working Dockerfile available.
4. Port Binding: Is there a difference in how Railway's infrastructure handles port binding for static sites versus API services?
Additional Context
- The backend and frontend are part of a monorepo with separate packages
- Frontend is a Vite-built React/TypeScript application
- All local development works perfectly
- The same codebase builds successfully on Railway but fails at runtime
Thanks,
Gonen3 Replies
Railway
BOT
3 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
brody
EMPLOYEE
3 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 brody • 3 months ago
irazvan2745
PRO
3 months ago
are you pointing the domain to the correct port? Also i recommend using railpack, not nixpacks
irazvan2745
PRO
3 months ago
check the logs too