a year ago
Greetings, I'm trying to deploy a metabase and it keeps failing for no reason. To test, I used your official integration (https://railway.com/deploy/metabase) and it also failed. What can I do?
Env example:
ENABLE_ALPINE_PRIVATE_NETWORKING="true"
MB_DB_DBNAME="${{Postgres.PGDATABASE}}"
MB_DB_HOST="${{Postgres.PGHOST}}"
MB_DB_PASS="${{Postgres.PGPASSWORD}}"
MB_DB_PORT="${{Postgres.PGPORT}}"
MB_DB_TYPE="postgres"
MB_DB_USER="${{Postgres.PGUSER}}"
MB_PASSWORD_COMPLEXITY="strong"
MB_SITE_URL="https://${{RAILWAY_PUBLIC_DOMAIN}}"
PORT="3000"
69 Replies
a year ago
What error are you getting?
In the deploy console it doesn't show me any errors, in the build console it shows me the error that occurred to you, and if I go to the general console of the entire project it says this:
a year ago
Seems like the healthcheck endpoint is failing, not the service itself
2025-06-12 16:12:06.008 UTC [30702] LOG: could not receive data from client: Connection reset by peer
2025-06-12 16:12:06.008 UTC [30699] LOG: could not receive data from client: Connection reset by peer
2025-06-12 16:12:06.008 UTC [30701] LOG: could not receive data from client: Connection reset by peer
2025-06-12 16:12:06.008 UTC [30700] LOG: could not receive data from client: Connection reset by peer
Warning: environ value jdk-21.0.7+6 for key :java-version has been overwritten with 21.0.7
2025-06-12 16:12:14,577 INFO metabase.util :: Maximum memory available to JVM: 29.5 GB
2025-06-12 16:12:18,827 INFO util.encryption :: Saved credentials encryption is DISABLED for this Metabase instance. 🔓
For more information, see https://metabase.com/docs/latest/operations-guide/encrypting-database-details-at-rest.html
2025-06-12 16:12:30.989 UTC [30709] LOG: could not receive data from client: Connection reset by peer
2025-06-12 16:12:30.989 UTC [30707] LOG: could not receive data from client: Connection reset by peer
2025-06-12 16:12:30.989 UTC [30708] LOG: could not receive data from client: Connection reset by peer
2025-06-12 16:12:30.989 UTC [30706] LOG: could not receive data from client: Connection reset by peer
2025-06-12 16:13:21.673 UTC [74] LOG: checkpoint starting: time
2025-06-12 16:13:24.526 UTC [74] LOG: checkpoint complete: wrote 29 buffers (0.2%); 0 WAL file(s) added, 0 removed, 0 recycled; write=2.810 s, sync=0.008 s, total=2.854 s; sync files=23, longest=0.006 s, average=0.001 s; distance=128 kB, estimate=169 kB; lsn=0/1AD2180, redo lsn=0/1AD2148
Correct, I tried using the railway official, and displaying it exactly the same also gives the same error
a year ago
Im not at home rn, will try to see if I can reproduce it when possible
Will it affect my trial plan? I'll upgrade to the hobby plan to see if the increased capacity stops the error
a year ago
Oh, then it's probably the trial resource limits like the 500mb
Ohhh, a thousand apologies, I'm going to try the hobby plan and I'll let you know if it's fixed.
a year ago
@Dreez Deployed an instance and it also gave health check endpoint errors
a year ago
While the metabase service initializes tables the healthcheck endpoint triggers multiple times and fails
a year ago
But after some minutes it finished migrating tables and the next healthcheck endpoint was fine
a year ago
What I would do: remove the healthcheck endpoint for the first start, let metabase run and migrate tables and then re-add the healthcheck endpoint
a year ago
Can you test that please?
a year ago
You can find the healthcheck endpoint on the bottom of the service settings
Yes, I already removed it, although I already have the tables created in Postgres, it is deploying healthcheck at this time.
a year ago
Did metabase deploy successfully?
a year ago
Those errors from postgres are from unclosed connections
a year ago
Can you test one last thing?
Remove all metabase related services (metabase, postgres and volumes)
Right click the empty canvas -> templates -> search for metabase
It will show the services it will deploy, remove the endpoint from there then confirm the deploy of the template
a year ago
correcting myself here: trial limits have been bumped to 1gb so I don't think resources are the issue here.
a year ago
it depends on the project, if you use the same db then yes
a year ago
I wonder if we can deploy the Metabase template, let it run then switch the db with your db
And is it advisable to separate the database from my project's metabase? I create many tables in my app's database.
====================
Starting Healthcheck
====================
Path: /api/health
Retry window: 5m0s
Attempt #1 failed with service unavailable. Continuing to retry for 4m49s
Attempt #2 failed with service unavailable. Continuing to retry for 4m38s
Attempt #3 failed with service unavailable. Continuing to retry for 4m26s
Attempt #4 failed with service unavailable. Continuing to retry for 4m12s
Attempt #5 failed with service unavailable. Continuing to retry for 3m54s
Attempt #6 failed with status 503: {"status":"initializing","progress":0.2}. Continuing to retry for 3m36s
Attempt #7 failed with service unavailable. Continuing to retry for 2m56s
Attempt #8 failed with service unavailable. Continuing to retry for 2m15s
Attempt #9 failed with service unavailable. Continuing to retry for 1m35s
Attempt #10 failed with service unavailable. Continuing to retry for 55s
Attempt #11 failed with service unavailable. Continuing to retry for 17s
1/1 replicas never became healthy!
Healthcheck failed!
a year ago
This is with the healthcheck path
a year ago
Remove the Healthcheck path from your service settings
a year ago
In the metabase settings
a year ago
I swear I can't reproduce this error of yours lol
a year ago

a year ago
It's probably related to the already in use db
a year ago
Now try readding the healthcheck
a year ago
Since it supposedly did all the needed migrations
a year ago
yeah
a year ago
healthchecks are important!
====================
Starting Healthcheck
====================
Path: /api/health
Retry window: 5m0s
Attempt #1 failed with service unavailable. Continuing to retry for 4m49s
Attempt #2 failed with status 503: {"status":"initializing","progress":0.2}. Continuing to retry for 4m43s
Attempt #3 failed with status 503: {"status":"initializing","progress":0.3}. Continuing to retry for 4m41s
[1/1] Healthcheck succeeded!
a year ago
Cool! seems like we fixed it
a year ago
What probably happened was that Metabase was taking some extra time migrating the DB that was already in use, it took longer than the healthcheck timespan so it crashed
a year ago
Since it's fixed, can I mark this thread as solved?
a year ago
!s
Status changed to Solved medim • 11 months ago








