WordPress + MySQL

10 months ago

Description: Zero Config | One click | WordPress | Docker | MySQL

Category: Blogs

URL: https://railway.app/template/yG1Jw8

7 Replies

btnalexandreHOBBY

2 months ago

Hello @yav-ai

After many new deployments of the template, it seems that the WORDPRESS_DB_HOST variable is no longer correct and the template has become . As soon as the template is deployed for the first time, we get the following error on WordPress: Error establishing a database connection

The correct variable would be : ${{MySQL.RAILWAY_PRIVATE_DOMAIN}}

You should only enter the private IP of the MySQL container. Could you please investigate and deploy a fix?

Thank you.


btnalexandre

Hello @yav-aiAfter many new deployments of the template, it seems that the WORDPRESS_DB_HOST variable is no longer correct and the template has become . As soon as the template is deployed for the first time, we get the following error on WordPress: Error establishing a database connectionThe correct variable would be : ${{MySQL.RAILWAY_PRIVATE_DOMAIN}}You should only enter the private IP of the MySQL container. Could you please investigate and deploy a fix?Thank you.

2 months ago

Hi @btnalexandre,

Thanks for reporting this - We just tried deploying the template but could not replicate database connection error. Once the template was deployed, the first visit loads the language selection page successfully. We will pass this on to another developer on the team to verify the same again and will back to you if there are any changes or fixes that need to be made on the template.

Cheers,

YAV.AI


yav-ai

Hi @btnalexandre,Thanks for reporting this - We just tried deploying the template but could not replicate database connection error. Once the template was deployed, the first visit loads the language selection page successfully. We will pass this on to another developer on the team to verify the same again and will back to you if there are any changes or fixes that need to be made on the template.Cheers,YAV.AI

btnalexandreHOBBY

2 months ago

Thanks for your quick reply !

For more context: this seems to happen when I have two environments (e.g. production, staging) with the template deployed. Templates are deployed on Amsterdam eu-west-4


2 months ago

Hi @btnalexandre,

We tested this again by creating a fresh deployment as "Production" and then adding a new "Staging" environment but could not replicate the error. For additional context we tested this on US West (Oregon, USA) zone.

If you can give us the exact steps to replicate this error - Happy to look into it and implement a fix to the template.

Here are the links for your ref: ( PS: We will delete these after 24 hours of posting this reply )

Prod: https://docker-image-production-94ce.up.railway.app/

Stg: https://docker-image-staging-94ce.up.railway.app/

Cheers,

YAV.AI


yav-ai

Hi @btnalexandre,We tested this again by creating a fresh deployment as "Production" and then adding a new "Staging" environment but could not replicate the error. For additional context we tested this on US West (Oregon, USA) zone. If you can give us the exact steps to replicate this error - Happy to look into it and implement a fix to the template.Here are the links for your ref: ( PS: We will delete these after 24 hours of posting this reply )Prod: https://docker-image-production-94ce.up.railway.app/Stg: https://docker-image-staging-94ce.up.railway.app/Cheers,YAV.AI

btnalexandreHOBBY

2 months ago

Hello,

Thanks for your quick reply. Indeed, it seems to work for you. Could you test 2 Wordpress + MYSQL instances in the same environment?

I think the best way to reproduce this bug is to test in the Amsterdam region.

Keep me updated.

Thanks a lot.


2 months ago

Hi @btnalexandre,

Unfortunately, we don't have access to the Amsterdam region and hence unable to test it specifically on that region. We will have another look to try and create 2 seperate projects of each and see if there are any issues there. Alternatively, will also try to split the db connection into seperate env vars as an enhancement to the template.

Will keep you posted with the findings If you feel that this is a region specific error maybe Railway support needs to be made aware of this.

Cheers,

YAV.AI


btnalexandreHOBBY

2 months ago

Okay thanks let me know when you have a workaround


WordPress + MySQL - Railway Help Station