Closed coderreco closed 5 months ago
Thank you for opening this issue @coderreco . It seems like the build time is taking long and the healthcheck is executing before, which stops the build after retrying 10 times.
Can I get you to try the following:
300
If that doesn't work, you can also try either increasing the timeout value or the number in the "On-Failure Restart Policy Max Retry" field. Let me know if any of these solutions work out
I had this issue as well. The timeout is probably because the backend service is unable to connect to another dependent service, i.e. the Postgres instance.
You will need to amend a couple of the env vars as the default ones are incorrect.
Change {{Postgresql.DATABASE_URL}}
to lowercase, like, {{postgresql.DATABASE_URL}}
Similar for the redis instance.
Thank you @jpizzle34 , but we've fixed the docs and the button to fix the variable names, so that's not the issue. Also, if there's any issue in connected to PostgreSQL or Redis then there would be an error like "cannot connect to xxx"
There are no error in the logs, and the build hasn't finished before the deployment is considered as failed, so I think it's most likely due to the healthcheck timeout.
I had this issue as well. The timeout is probably because the backend service is unable to connect to another dependent service, i.e. the Postgres instance.
You will need to amend a couple of the env vars as the default ones are incorrect.
Change
{{Postgresql.DATABASE_URL}}
to lowercase, like,{{postgresql.DATABASE_URL}}
Similar for the redis instance.
Thanks for the insight, but I checked and confirmed the variables in mine were already correct.
Ahhh i see. Sorry i jumped the gun there :)
@jpizzle34 all good! I actually only recently discovered the issue with environment variables, so it's always helpful to be made aware of this stuff 😄
Ahhh i see. Sorry i jumped the gun there :)
No apology necessary! Appreciate the help and any other insights into how you got it working.
@shahednasser I checked the timeout and it was already set to 300. I upped it to 500, and updated to the new version from upstream. It is building currently and I will report back on whether it succeeds or fails this time around.
@shahednasser No changes and same outcome unfortunately.
During each health check(I think), I can see in the deploy logs that it is not finding the redis_url:
I am attempting a deploy with the redis_url value pasted directly into the environment variable instead of using the plugin value to see if that makes any change.
This is not an issue, as Medusa will use a fake redis (although functionalities related to scheduled jobs will not work). To enable Redis, you can refer to this documentation.
Did it stop at the "Compiling Webpack" step, or did it move forward? It's strange but I can't reproduce it on my end, so that's why a lot of this is just mainly me guessing 😅
It looks like it always stops on the compiling webpack step. Well I appreciate your help! That is strange as I have had the same result on two entirely separate attempts to use the template.
Maybe you can try another hosting provider. You can find our guides for all providers here.
You can also view the public demo we have of the Railway template. Maybe it will provide some idea to how to fix it or any differences compared to your project?
Hey, thanks for the report! Since v2 brought a lot of architectural and API changes on the backend, we will be closing this ticket since it no longer applies to our new setup, or the issue has already been fixed. If you are still facing issues with v1, please open a new ticket and we will address it as soon as possible. Thanks! 🙏
Bug report
When deploying the 'Deploy Medusa Backend on Railway' Railway template(Railway, (Github)[https://github.com/shahednasser/railway-deploy-demo]), the build and deployment fails. cc: @shahednasser
Describe the bug
When deploying the 'Deploy Medusa Backend on Railway' Railway template(Railway, (Github)[https://github.com/shahednasser/railway-deploy-demo]), the build and deployment fails. The build logs indicate that the healthcheck fails:
And the deploy logs indicate that the redis instance may not be connecting properly?
System information
Managed deployment via Railway Template
Steps to reproduce the behavior
Expected behavior
Expected a successful deployment of the medusa backend and admin panel.
Screenshots
Code snippets
N/A
Additional context
N/A