2 months ago
I am trying to host Frappe HRMS on Railway using the MariaDB service that I provisioned within the same Railway project. Both the HRMS application and the MariaDB instance are part of this project, and I can confirm the connection details are visible. However, the HRMS application fails to connect to the database at runtime.
Setup details:
Repo cloned into GitHub, with a single entrypoint folder:
/deploy/singleFiles inside
/deploy/single:apps.jsonDockerfileentrypoint.sh
Root directory:
deploy/singleCustom build command:
/entrypoint.shBuild succeeds without error, but deployment fails at runtime.
Logs excerpt:
Starting Container
Starting local Redis on 127.0.0.1:6379 ...
4:C 01 Oct 2025 21:59:32.050 # WARNING Memory overcommit must be enabled! ...
Wrote common_site_config.json
Waiting for MariaDB mariadb.railway.internal:3306 ...
WARN: MariaDB not reachable after 60s.
Starting local Redis on 127.0.0.1:6379 ...
Problem:
The deployment repeatedly fails with the message:WARN: MariaDB not reachable after 60s.
Attachments:
Relevant config files
Application logs
Attachments
1 Replies
2 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 • 2 months ago
2 months ago
Hello I can see that your MariaDB service isn't being reached @antixxtechhub. Based on your entrypoint.sh it looks like your wait_for_db function is checking if MariaDB’s port 3306 is open, but it doesn’t mean the database is ready to process queries. Railway’s MariaDB might still be running initialization even after the port starts listening. This could be why you’re hitting that 60-second timeout. I would suggest beefing up your wait_for_db function to test the database connectivity. I would suggest something that waits for MariaDB to check after 120 seconds. Lastly, you can verify what value you’re using for the DB_Host in your environment variables, it would look similar to this: DB_HOST=${{MariaDB.RAILWAY_PRIVATE_DOMAIN}}. Also, is your MariaDB service fully deployed before HRMS tries to connect?