6 days 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:
ENABLEALPINEPRIVATE_NETWORKING="true"
MBDBDBNAME="${{Postgres.PGDATABASE}}"
MBDBHOST="${{Postgres.PGHOST}}"
MBDBPASS="${{Postgres.PGPASSWORD}}"
MBDBPORT="${{Postgres.PGPORT}}"
MBDBTYPE="postgres"
MBDBUSER="${{Postgres.PGUSER}}"
MBPASSWORDCOMPLEXITY="strong"
MBSITEURL="https://${{RAILWAYPUBLICDOMAIN}}"
PORT="3000"
0 Replies
6 days 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:
6 days 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
6 days 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
5 days 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.
5 days ago
@Dreez Deployed an instance and it also gave health check endpoint errors
5 days ago
While the metabase service initializes tables the healthcheck endpoint triggers multiple times and fails
5 days ago
But after some minutes it finished migrating tables and the next healthcheck endpoint was fine
5 days 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
5 days ago
Can you test that please?
5 days 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.
5 days ago
Did metabase deploy successfully?
5 days ago
Those errors from postgres are from unclosed connections
5 days 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
5 days ago
correcting myself here: trial limits have been bumped to 1gb so I don't think resources are the issue here.
5 days ago
it depends on the project, if you use the same db then yes
5 days 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!
5 days ago
This is with the healthcheck path
5 days ago
Remove the Healthcheck path from your service settings
5 days ago
In the metabase settings
5 days ago
I swear I can't reproduce this error of yours lol
5 days ago
5 days ago
It's probably related to the already in use db
5 days ago
Now try readding the healthcheck
5 days ago
Since it supposedly did all the needed migrations
5 days ago
yeah
5 days 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!
5 days ago
Cool! seems like we fixed it
5 days 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
5 days ago
Since it's fixed, can I mark this thread as solved?
5 days ago
!s
Status changed to Solved medim • 5 days ago