Error "Unknown MySQL server host"

I'm getting this error every so often. No redeploy or restart were done when this errors happened. The problem seems to resolve on it's own without redeploy or restart needed (thats good) but it sometimes endures for a couple of minutes resulting in downtime to end users.
No description
18 Replies
Percy
Percy4mo ago
Project ID: 5a24ad58-38fd-44b0-ac79-47f2f1093c71
dwaynemac
dwaynemac4mo ago
project ID 5a24ad58-38fd-44b0-ac79-47f2f1093c71
Brody
Brody4mo ago
rails?
dwaynemac
dwaynemac4mo ago
yes
Brody
Brody4mo ago
nixpacks or dockerfile?
dwaynemac
dwaynemac4mo ago
dockerfile
Brody
Brody4mo ago
alpine based?
dwaynemac
dwaynemac4mo ago
but it's not on deploy, it's while already running. checking.. i think it's not alpine based:
FROM ruby:2.7.8-buster
FROM ruby:2.7.8-buster
still, i believe alpine issue is on fresh-deploy connections, right?
Brody
Brody4mo ago
no, it would effect dns lookups at any point during runtime but that is indeed not alpine based, are you sure thats the only image in use though?
dwaynemac
dwaynemac4mo ago
only dockerfile on this project, only FROM on the dockerfile. is that what you mean?
Brody
Brody4mo ago
check the internal domain listed in the database service settings, is the the correct domain your logs are printing?
dwaynemac
dwaynemac4mo ago
yes, mysql-ambe.railway.internal. it's correct
Brody
Brody4mo ago
is the rails mysql client capable of doing a AAAA lookup by default? since these domains are ipv6 only
dwaynemac
dwaynemac4mo ago
connection works most of the time. this error pops randomly
Brody
Brody4mo ago
try the alpine workaround anyway, rails might be doing something funky here https://docs.railway.app/guides/private-networking#workaround-for-alpine-based-images
dwaynemac
dwaynemac4mo ago
i'll try that. thanks. you mean adding ENABLE_ALPINE_PRIVATE_NETWORKING=true ?
Brody
Brody4mo ago
yeah
dwaynemac
dwaynemac4mo ago
Ok. Thx a lot