'drop of mysql connection on heroku
Thanks first of all to those who read me and try to help me. I also apologize for the bad form of expression, but I use Google Translator to be able to express my problem.
My name is Moreno, 68 years old from Italy, passionate about programming and always involved in volunteering for non-profit associations.
I developed a web application spa for the parish using Angular as frontend, Nodejs as backend and Mysql as database. To manage the test phase, I deployed the frontend in Vercel and the backend in Heroku using the repositories on Github. Everything has been concluded correctly and I am able to operate, even with good times remotely. Operating I found, however, after a few minutes of connection, a malfunction and I am notified of the connection failure on mysql.
I also report the code in db.js for the database connection.
In the backend deployment phase I used it as a resource to connect Mysql to the ClearDB backend, but I didn't encounter any problems.
I have submitted a request for assistance to Heroku, but they have replied that it is not their responsibility.

I'm trying to enter the code I use, but it always gives me an error and I can't. Can you also help me complete my support request in full with the code I use?
thank you for the suggestions, but I worked as you said, but an error was always highlighted that prevented posting the code. Now try again to attach screenshots. I also tried to think about the cause of this malfunction and I think I have identified the problem, however, only from the point of view of intuition. I have no elements to confirm this hypothesis. When deploying on Heroku I used ClearDB as an add-on. I think it is ClearDb that closes my connection. Could that be probable? In case how can I solve the problem?

config.json
{
"host": "eu-cdbr-west-02.cleardb.net",
"user": "b60576bf178464",
"password": "dddd8db2",
"database":"heroku_002b5ddee9750af",
"port":3306,
"dialect": "mysql",
"underscored": 0,
"pool": {
"max": 5,
"min": 0,
"acquire": 30000,
"idle": 10000
},
"secret": "mysecret is zoe",
"expiresIn": 86400,
"emailFrom": "[email protected]",
"smtpOptions": {
"host": "authsmtp.tecnomedia.biz",
"port": 25,
"auth": {
"user": "[email protected]",
"pass": "MRN2021GSLL"
},
"tls": {
"rejectUnauthorized": false
},
"secure": false
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
