R
Railway•10mo ago
cyko92

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•10mo ago
Project ID: 727b055e-3bcf-4dee-88c9-e7f10645b1b5
cyko92
cyko92•10mo ago
Project ID : 727b055e-3bcf-4dee-88c9-e7f10645b1b5
Brody
Brody•10mo 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
cyko92
cyko92•10mo ago
Oh ok, there is another alternativ ?
Brody
Brody•10mo ago
have you done #1 yet?
cyko92
cyko92•10mo ago
Not yet i'm not at home 🥲 nodemon was removed
Brody
Brody•10mo ago
is pool even a valid client config? i cant find anyting about it in their docs
cyko92
cyko92•10mo ago
I'll try to see if the error recurs without nodemon
Brody
Brody•10mo ago
how opposed would you be to moving over to knex
cyko92
cyko92•10mo ago
I don't know, I'll have to find out
Brody
Brody•10mo ago
the default pool min is zero according to the pooling library pg uses
cyko92
cyko92•10mo ago
ok I had put 0
Brody
Brody•10mo ago
yeah i know, but the pg docs doesnt say thats a valid config doesnt matter though since the default is zero
cyko92
cyko92•10mo ago
but I thought I saw an example in the documentation ok thanks that's good to know lol
Brody
Brody•10mo ago
if there is an example, its not where it should be https://node-postgres.com/apis/client#new-client
cyko92
cyko92•10mo ago
yes I saw it on this site
Brody
Brody•10mo ago
wanna try this instead? require('pg').native;
cyko92
cyko92•10mo ago
but the mistake I made happened a few hours later Maybe I should wait before changing the code?
Brody
Brody•10mo ago
maybe
cyko92
cyko92•10mo ago
can we leave the ticket open until the error recurs or not?
Brody
Brody•10mo ago
of course
cyko92
cyko92•10mo ago
Than for your time 😉 *Thank
Brody
Brody•10mo ago
no problem p.s. you can edit discord messages
cyko92
cyko92•10mo ago
yes lool