R
Railway2y ago
ra

MySQL Connection not available.

this error wasn't showing up much but lately it started getting a bit more and usually restarting the bot solves the problem but I want it not to appear at all
15 Replies
Percy
Percy2y ago
Project ID: bd35da20-981f-49ac-8333-eb8c89c3acbd
ra
raOP2y ago
bd35da20-981f-49ac-8333-eb8c89c3acbd
Brody
Brody2y ago
what are your database connection settings?
ra
raOP2y ago
what do you mean by database connection settings ? i mean i cant find it
ra
raOP2y ago
is this ?
Brody
Brody2y ago
show me a screenshot of the service variables please
ra
raOP2y ago
ra
raOP2y ago
sorry for the late reply btw
Brody
Brody2y ago
you should be using variable references, please read this https://docs.railway.app/develop/variables#reference-variables once you have that setup, come back and show me another screenshot please
ra
raOP2y ago
is it okay now ?
Brody
Brody2y ago
yes
ra
raOP2y ago
okay thank you very much 🙏
Brody
Brody2y ago
no problem
rando
rando2y ago
Likely cause: you're prematurely closing the connection in your code. Make sure the connection is available for the cursor you created. Check all of your .close() statements, especially on con
ra
raOP2y ago
i dont use any .close()
Want results from more Discord servers?
Add your server