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
Project ID:
bd35da20-981f-49ac-8333-eb8c89c3acbd
bd35da20-981f-49ac-8333-eb8c89c3acbd
what are your database connection settings?
what do you mean by database connection settings ?
i mean i cant find it
is this ?
show me a screenshot of the service variables please
sorry for the late reply btw
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
is it okay now ?
yes
okay thank you very much 🙏
no problem
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
i dont use any .close()