4 months ago
Dear All,
I am new to deploying apps here, any advice would be welcome.
Ive tried adding tons of debugging logs but still after 8s everything just quits.
Starting Container
Checking frontend config...
Template exists: True
Config.js exists: False
Generating frontend/js/config.js from template...
Template content length: 197 chars
MAPBOX_ACCESS_TOKEN found: True
GOOGLE_MAPS_API_KEY found: True
Generated config.js (278 bytes)
First line of config.js: // Mapbox configuration - populated from environme...
Frontend config complete
=== VERIFYING DIRECTORY STRUCTURE ===
Current working directory: /app
frontend/ exists: True
frontend/js/ exists: True
frontend/js/config.js exists: True
JS files found: ['visualization.js', 'routing.js', 'app.js', 'map.js', 'config.js']
=== END DIRECTORY CHECK ===
Completing initialization...
Initializing Google Maps client...
Initialized Google Maps client
Google Maps initialization complete
Loading graphs...
Loaded TfL graph: 272 nodes, 314 edges
Loaded merged graph: 272 nodes, 36856 edges
Loaded 272 stations
Loading multi-layer routing graph from data/merged_multilayer_graph.pickle...
Loaded multi-layer graph: 366 nodes (272 unique stations), 66795 connections
Applying station access buffers to bike edges...
Applied buffers to 66312 bike edges
Average buffer: 9.0 minutes
Station access: 2.0 min, Train wait: 5.0 min
Initialized multi-layer router with data/merged_multilayer_graph.pickle
Graph loading complete
=== INITIALIZATION COMPLETE ===
[2025-06-09 17:54:34 +0000] [1] [INFO] Starting gunicorn 23.0.0
[2025-06-09 17:54:34 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1)
[2025-06-09 17:54:34 +0000] [1] [INFO] Using worker: sync
[2025-06-09 17:54:34 +0000] [4] [INFO] Booting worker with pid: 4
=== APP.PY STARTING ===
1. Basic imports complete
2. Adding src to Python path...
3. Importing route_planner_multilayer...
Successfully imported MultiLayerBikeTransitRouter
3.5. Defining global variables...
3.6. Defining functions...
Flask app created
=== BROMPTON MAPS INITIALIZATION ===
Running on Railway: True
Railway Environment: production
Railway Service: bromptonMaps
=== CHECKING ENVIRONMENT VARIABLES ===
MAPBOX_ACCESS_TOKEN: ******** (length: 86)
GOOGLE_MAPS_API_KEY: ******** (length: 39)
PORT: **** (length: 4)
=== END ENVIRONMENT CHECK ===
Loading environment variables...
Skipping load_dotenv() on Railway (using Railway env vars)
Stopping Container
[2025-06-09 18:04:21 +0000] [1] [INFO] Handling signal: term
[2025-06-09 18:04:21 +0000] [4] [INFO] Worker exiting (pid: 4)
4 Replies
4 months ago
Hi there
i think that railway will terminate your service without an error message(!) if it exceeds the allocated resources like RAM or CPU and seeing that you are on a free plan that sounds very likely to me. The thing is that the spike in usage wont show up in the metrics
consider upgrading to a hobby plan to see how it goes
however your app https://www.bromptonmaps.com/ seems to be running. Cool app btw.
did you figure out what was causing it?
alex
4 months ago
I’ve run into that termination issue myself while testing out a Minecraft server template which happened because of the free tier resource limits.
alexwebgr
Hi therei think that railway will terminate your service without an error message(!) if it exceeds the allocated resources like RAM or CPU and seeing that you are on a free plan that sounds very likely to me. The thing is that the spike in usage wont show up in the metricsconsider upgrading to a hobby plan to see how it goeshowever your app https://www.bromptonmaps.com/ seems to be running. Cool app btw.did you figure out what was causing it?alex
4 months ago
yep! it was loading the pickle file that defines the transport graph haha, creating a new skeleton app which just incrementally added the logic to get back to my app and found it crashed at that point! Now i do lazy loading so it loads the graph on the first request rather than having it pre loaded which caused the start up crash.
Status changed to Open sarahkb125 • 4 months ago
Status changed to Solved sarahkb125 • 4 months ago