R
Railway•14mo ago
Wannabe SWE

Error inserting data into the database: Error: read ECONNRESET (possibly a network issue)

I went with a pool connection approach for my back end sql connection last night to fix an issue I was having with not being able to connect to the database. Seemed to work fine but this morning I tested the contact form and database again and it didn't work even though it worked yesterday after fixing a previous error. This is the error logs from the observability tab. I did some research and it could very possibly be a network issue but I'm not 100% about that of course
Error inserting data into the database: Error: read ECONNRESET

at PromisePoolConnection.query (/app/node_modules/mysql2/promise.js:94:22)

at file:///app/server.js:42:26

at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {

code: 'ECONNRESET',

errno: -104,

sql: undefined,

sqlState: undefined,

sqlMessage: undefined

}
Error inserting data into the database: Error: read ECONNRESET

at PromisePoolConnection.query (/app/node_modules/mysql2/promise.js:94:22)

at file:///app/server.js:42:26

at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {

code: 'ECONNRESET',

errno: -104,

sql: undefined,

sqlState: undefined,

sqlMessage: undefined

}
I'm also linking the public github repo for the website https://github.com/hiphiphorhayy/montoyamasonry
GitHub
GitHub - hiphiphorhayy/montoyamasonry
Contribute to hiphiphorhayy/montoyamasonry development by creating an account on GitHub.
8 Replies
Percy
Percy•14mo ago
Project ID: bd779870-1b99-4af3-b0da-20a63fb58772
Wannabe SWE
Wannabe SWE•14mo ago
bd779870-1b99-4af3-b0da-20a63fb58772 Okay so I redeployed the website without making changes and it works just fine now but honestly I want to wait a day or maybe almost a day before sending another contact form submission to be sure it isn't an issue of connection resets, stale connections or connections being aborted
misimilen
misimilen•14mo ago
is private networking enabled in the settings for the app?
Wannabe SWE
Wannabe SWE•14mo ago
It is enabled in the website services settings yes
misimilen
misimilen•14mo ago
ok, I had the problem with that setting. For some reason it made my app not be able to connect to my database most of the time and the few times the app succeeded with connection to the db I was just considering myself lucky so I recommend turning it off. @Brody told me something similar but I guess he has a much better explanation 😄
Brody
Brody•14mo ago
🙂
Wannabe SWE
Wannabe SWE•13mo ago
My bad i never got pinged so I never saw this I fixed the problem by simply restarting the database But I’m still a week away from advertising and marketing the website so if it happens again I’ll try turning it off
misimilen
misimilen•13mo ago
You can try and increase connection timeouts There is currently a bug with provate networking thT it enables itself after a while
Want results from more Discord servers?
Add your server