Gateway Timeout (504) Errors

Gateway timeout errors occur when the Coolify proxy cannot get a response from your application within the configured timeout period. This is different from Bad Gateway (502) errors, which indicate the proxy cannot connect to your application at all.

Common Causes

There are two primary scenarios that cause 504 Gateway Timeout errors in Coolify:

  1. Custom Docker Network Isolation - The proxy cannot reach applications using custom networks
  2. Large Upload/Download Timeouts - Default timeout settings are too short for large file transfers

Quick Diagnosis Checklist

Run through these steps to identify your specific issue:

  1. Check the error code:

  2. Check timing:

    • Immediate = likely network/configuration issue
    • After ~60 seconds = likely timeout issue
    • Random after hours/days = likely network isolation issue
  3. Check network configuration:

    # List all Docker networks
    docker network ls
    
    # Check which networks your containers are using
    docker ps --format "table {{.Names}}\t{{.Networks}}"

Prevention Tips

  1. Avoid custom Docker networks unless absolutely necessary
  2. Set appropriate timeouts for your application's needs during initial setup
  3. Implement health checks to maintain connectivity
  4. Monitor proxy logs regularly for timeout patterns
  5. Use progress indicators for long-running operations to prevent client-side timeouts

Support

If these solutions don't resolve your gateway timeout issues:

  1. Collect diagnostic information:

    # Save this output
    docker ps --format "table {{.Names}}\t{{.Networks}}\t{{.Status}}"
    docker logs coolify-proxy --tail 200 > proxy-logs.txt
    docker logs <your-container-name> --tail 200 > app-logs.txt
  2. Join our Discord Community

  3. Share your configuration, logs, and the specific steps you've tried

On this page