R
Railwayβ€’16mo ago
Cyko

Read ECONRESET AT TCP.onStream NodeJs

Hello, I'm using railway to deploy my nodeJs api, when i'm not using the api during few hours i see this message in the console , I don't know how to fix this problem ... i add a screenshot of my database.js Thank you πŸ™‚
24 Replies
Percy
Percyβ€’16mo ago
Project ID: 727b055e-3bcf-4dee-88c9-e7f10645b1b5
Cyko
CykoOPβ€’16mo ago
Project ID : 727b055e-3bcf-4dee-88c9-e7f10645b1b5
Brody
Brodyβ€’16mo ago
1. do not use nodemon on railway, remove nodemon from your start command immediately please 2. this has been fixed in the path by specifying pool.min = 0, but you've done that already
Cyko
CykoOPβ€’16mo ago
Oh ok, there is another alternativ ?
Brody
Brodyβ€’16mo ago
have you done #1 yet?
Cyko
CykoOPβ€’16mo ago
Not yet i'm not at home πŸ₯² nodemon was removed
Brody
Brodyβ€’16mo ago
is pool even a valid client config? i cant find anyting about it in their docs
Cyko
CykoOPβ€’16mo ago
I'll try to see if the error recurs without nodemon
Brody
Brodyβ€’16mo ago
how opposed would you be to moving over to knex
Cyko
CykoOPβ€’16mo ago
I don't know, I'll have to find out
Brody
Brodyβ€’16mo ago
the default pool min is zero according to the pooling library pg uses
Cyko
CykoOPβ€’16mo ago
ok I had put 0
Brody
Brodyβ€’16mo ago
yeah i know, but the pg docs doesnt say thats a valid config doesnt matter though since the default is zero
Cyko
CykoOPβ€’16mo ago
but I thought I saw an example in the documentation ok thanks that's good to know lol
Brody
Brodyβ€’16mo ago
if there is an example, its not where it should be https://node-postgres.com/apis/client#new-client
Cyko
CykoOPβ€’16mo ago
yes I saw it on this site
Brody
Brodyβ€’16mo ago
wanna try this instead? require('pg').native;
Cyko
CykoOPβ€’16mo ago
but the mistake I made happened a few hours later Maybe I should wait before changing the code?
Brody
Brodyβ€’16mo ago
maybe
Cyko
CykoOPβ€’16mo ago
can we leave the ticket open until the error recurs or not?
Brody
Brodyβ€’16mo ago
of course
Cyko
CykoOPβ€’16mo ago
Than for your time πŸ˜‰ *Thank
Brody
Brodyβ€’16mo ago
no problem p.s. you can edit discord messages
Cyko
CykoOPβ€’16mo ago
yes lool
Want results from more Discord servers?
Add your server