R
Railwayβ€’2y ago
gnuumer

Issue with Postgres on deployment. ECONNREFUSED

Hello, I have an issue that the railway service seems to not connect to the Postgre database even though the DATABASE_URL env variable passed to the program is all correct in correct order as well, so I am suspecting something wrong with my railway setup. The full error log:
> node ./app/app.js
WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/node-config/node-config/wiki/Strict-Mode
Thu, 04 May 2023 12:09:31 GMT node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.
In the future, you will have to enable it yourself.
See https://github.com/yagop/node-telegram-bot-api/issues/319. at node:internal/modules/cjs/loader:1155:14
WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/node-config/node-config/wiki/Strict-Mode
Thu, 04 May 2023 12:09:32 GMT node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.
In the future, you will have to enable it yourself.
See https://github.com/yagop/node-telegram-bot-api/issues/319. at node:internal/modules/cjs/loader:1155:14
[MoralisService::cachePrices] prices cached
[MoralisService::cachePrices] prices cached
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
Error: connect ECONNREFUSED 127.0.0.1:5432
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 5432
}
> node ./app/app.js
WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/node-config/node-config/wiki/Strict-Mode
Thu, 04 May 2023 12:09:31 GMT node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.
In the future, you will have to enable it yourself.
See https://github.com/yagop/node-telegram-bot-api/issues/319. at node:internal/modules/cjs/loader:1155:14
WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/node-config/node-config/wiki/Strict-Mode
Thu, 04 May 2023 12:09:32 GMT node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.
In the future, you will have to enable it yourself.
See https://github.com/yagop/node-telegram-bot-api/issues/319. at node:internal/modules/cjs/loader:1155:14
[MoralisService::cachePrices] prices cached
[MoralisService::cachePrices] prices cached
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
Error: connect ECONNREFUSED 127.0.0.1:5432
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 5432
}
It might be useful to know that the Postgre database server (also deployed in Railway) says that its running on 0.0.0.0 and port 5432. thanks for all help! Project id: 578ca578-fb97-4683-b8ef-2c59b4a09608
276 Replies
Percy
Percyβ€’2y ago
Project ID: 578ca578-fb97-4683-b8ef-2c59b4a09608
gnuumer
gnuumerOPβ€’2y ago
in initial deploy logs, all seems fine
gnuumer
gnuumerOPβ€’2y ago
however, in the active logs the errconnect issue comes up. I can share any part of the code / log if it helps
Brody
Brodyβ€’2y ago
show me your service variables please
gnuumer
gnuumerOPβ€’2y ago
sure thing
gnuumer
gnuumerOPβ€’2y ago
Brody
Brodyβ€’2y ago
those are shared variables why are all your variables there
gnuumer
gnuumerOPβ€’2y ago
i thought it convenient to share to the services then
gnuumer
gnuumerOPβ€’2y ago
I do have them in the individual services too
Brody
Brodyβ€’2y ago
does more than one service need to access those variables
gnuumer
gnuumerOPβ€’2y ago
no only the backend (1)
Brody
Brodyβ€’2y ago
then remove them from the shared variables please
gnuumer
gnuumerOPβ€’2y ago
allright, ill do that done
Brody
Brodyβ€’2y ago
show me a full screenshot of your browser window open to your railway project
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
πŸ€”
Brody
Brodyβ€’2y ago
delete database_url
gnuumer
gnuumerOPβ€’2y ago
from the service...?
Brody
Brodyβ€’2y ago
yes
gnuumer
gnuumerOPβ€’2y ago
done
gnuumer
gnuumerOPβ€’2y ago
Brody
Brodyβ€’2y ago
and then setup the variable reference for it like that blue banner wants you to, then show me another screenshot
gnuumer
gnuumerOPβ€’2y ago
please specify blue banner? will it come after deployment process is done (failure i figure)
Brody
Brodyβ€’2y ago
I'm colourblind, is that banner that's talking about variables references not blue?
gnuumer
gnuumerOPβ€’2y ago
ah yes, its kinda purple, blue enough πŸ˜„
Brody
Brodyβ€’2y ago
blue is enough, yes okay do that
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
like this, right?
Brody
Brodyβ€’2y ago
yes good now show me the bit of code that connects to the database
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
here you go I got it printing "Database connection successful" before lol
gnuumer
gnuumerOPβ€’2y ago
(initial deploy logs)
Brody
Brodyβ€’2y ago
so.. good?
gnuumer
gnuumerOPβ€’2y ago
nope, the error still comes with the localhost lol
Brody
Brodyβ€’2y ago
show me
gnuumer
gnuumerOPβ€’2y ago
the error wasnt in the database URL
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
Brody
Brodyβ€’2y ago
fair, but you where doing that wrong so it needed to be done regardless
gnuumer
gnuumerOPβ€’2y ago
yeah, of course
Brody
Brodyβ€’2y ago
well do you know what bit of code is throwing that error?
gnuumer
gnuumerOPβ€’2y ago
absolutely not
Brody
Brodyβ€’2y ago
got a repo I could look at
gnuumer
gnuumerOPβ€’2y ago
there shouldnt be any issue I can send the code in a zip repo's piv
Brody
Brodyβ€’2y ago
lmfao you don't use github?
gnuumer
gnuumerOPβ€’2y ago
priv i do
Brody
Brodyβ€’2y ago
oh priv was about to say based for the fact of not using github yeah zip is fine I'll take a look when I'm on my computer in a bit
gnuumer
gnuumerOPβ€’2y ago
allright, np
Brody
Brodyβ€’2y ago
send the zip in the mean time tho
gnuumer
gnuumerOPβ€’2y ago
ive went through it a billion times
Brody
Brodyβ€’2y ago
haha I'll give it a good run down where it go
gnuumer
gnuumerOPβ€’2y ago
theres no reference to localhost in any of the code i dont understand where its coming from at all
Brody
Brodyβ€’2y ago
send the code
gnuumer
gnuumerOPβ€’2y ago
I did, check DM
Brody
Brodyβ€’2y ago
#πŸ›‚ο½œreadme #5
gnuumer
gnuumerOPβ€’2y ago
?
Brody
Brodyβ€’2y ago
did you read #5 of the readme
gnuumer
gnuumerOPβ€’2y ago
yes but I thought youd allow me not having to put it out here you want me to post it here nevertheless?
Brody
Brodyβ€’2y ago
dm'ing me breaks server rules
gnuumer
gnuumerOPβ€’2y ago
yeah lets not break it then
Brody
Brodyβ€’2y ago
yes, no one is gonna steal your code
gnuumer
gnuumerOPβ€’2y ago
tell me if you can get it
Brody
Brodyβ€’2y ago
okay now don't randomly delete it, I'll need to download it later when I'm on my computer
gnuumer
gnuumerOPβ€’2y ago
allright, np ETA?
Brody
Brodyβ€’2y ago
eta is 9 hours let's not ask community help for an eta please
gnuumer
gnuumerOPβ€’2y ago
do youve any idea what could cause the issue so i can troubleshoot meanwhile harder?
Brody
Brodyβ€’2y ago
I'm joking
gnuumer
gnuumerOPβ€’2y ago
a slightest guess would help
Brody
Brodyβ€’2y ago
I'm not joking no clue at all
gnuumer
gnuumerOPβ€’2y ago
the ip it tries to connect to the database, that shouldnt even be possible right tho? i was not tryna be rude sorry when i start the database it runs ipv4 on 0.0.0.0
Brody
Brodyβ€’2y ago
yeah I know, but that's irrelevant because database_url will contain it's public address
gnuumer
gnuumerOPβ€’2y ago
yeah, I figure so I can connect to the database from psql client as well
Brody
Brodyβ€’2y ago
yep
gnuumer
gnuumerOPβ€’2y ago
all i can think of logically is a faulty query but theres none where localhost is hardcoded
Brody
Brodyβ€’2y ago
ill do my best to see whats up
gnuumer
gnuumerOPβ€’2y ago
appreciate it ill do too πŸ˜„
Brody
Brodyβ€’2y ago
whats with the runtime.txt
gnuumer
gnuumerOPβ€’2y ago
its legacy along with procfile from h*roku the frontend is done with python
Brody
Brodyβ€’2y ago
show me your .env file please, blur the sensitive stuff
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
what do you want to know exactly? it can get all of them but the issue must be with the postgresql in railway
Brody
Brodyβ€’2y ago
its not postgre, the console logs said it cconnected
gnuumer
gnuumerOPβ€’2y ago
what else can it connec tto with 5432 port :/
Brody
Brodyβ€’2y ago
why do you have 5432 in your .env file
gnuumer
gnuumerOPβ€’2y ago
to specify the port just in case i can remove it but it wont be the solver lol also my other postgre instance i tried with runs in another service with that
Brody
Brodyβ€’2y ago
does this app start an http server
gnuumer
gnuumerOPβ€’2y ago
it shouldnt no I havent defined or generated any links for it in railway either
Brody
Brodyβ€’2y ago
okay
gnuumer
gnuumerOPβ€’2y ago
it recomended me to do that once, with some flyer that said "listening on 127.xxxxxx, try 0.0.0.0" which seemed like a nice solution but it led me nowhere since I didnt know how to implement that then i generated a random domain to the service to "expose" it but didnt help
gnuumer
gnuumerOPβ€’2y ago
"The easiest way to get up and running is to have your application listen on 0.0.0.0:$PORT, where PORT is a Railway-provided environment variable."
Brody
Brodyβ€’2y ago
you are running a bot thats not applicable
gnuumer
gnuumerOPβ€’2y ago
yeah, I guessed so immediately but still because i saw the server ip in 0.0.0.0 and I dont know much about how the docker is setup, if its in the same server so i begun believing in witchcraft
Brody
Brodyβ€’2y ago
full deploy logs please @GNUumer
gnuumer
gnuumerOPβ€’2y ago
sure thing could i download them somehow?
Brody
Brodyβ€’2y ago
no, copy paste into txt file and send that file here
gnuumer
gnuumerOPβ€’2y ago
gotcha
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
@Brody its three times in a row if you need it, I can redeploy, test stuff, anything im here for it. personally ran out of solutions
Brody
Brodyβ€’2y ago
add a console.log(process.env.DATABASE_URL); before the new Pool line in db/index.js
gnuumer
gnuumerOPβ€’2y ago
good idea, doing it ASAP (meaning rn)
Brody
Brodyβ€’2y ago
im not seeing a !!Database connection successful!! log in your logfile
gnuumer
gnuumerOPβ€’2y ago
I sent the log from the instance the log from the deploy is different
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
it has this stuff running all the time and the console.log should be in that there above as well or will be
Brody
Brodyβ€’2y ago
what is the difference between instance and deploy
gnuumer
gnuumerOPβ€’2y ago
i was hoping someone could tell me that too lol
gnuumer
gnuumerOPβ€’2y ago
the "deploy logs" have that above there
Brody
Brodyβ€’2y ago
you said it, im asking you
gnuumer
gnuumerOPβ€’2y ago
while the "restart logs" have this here
gnuumer
gnuumerOPβ€’2y ago
so when I click one of the times it restarts forcefully, I can see these logs sorta like the server log
gnuumer
gnuumerOPβ€’2y ago
Brody
Brodyβ€’2y ago
where is this from
gnuumer
gnuumerOPβ€’2y ago
server log, here when i click one of the restart messages and go deploy log
Brody
Brodyβ€’2y ago
wtf is a restart message
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
quite literally that i click it, go to "deploy logs" and see the errors otherwise theres no error in the actual "instance log"
Brody
Brodyβ€’2y ago
bruh
gnuumer
gnuumerOPβ€’2y ago
so for example, i click the latest deploy restarted so I could get a whiff of whats going on
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
but then the actual deploy logs be looking like this
Brody
Brodyβ€’2y ago
just show me the log for this
gnuumer
gnuumerOPβ€’2y ago
there we go catching it all in a file now...
gnuumer
gnuumerOPβ€’2y ago
and it keeps going on like that, as if theres no problem
Brody
Brodyβ€’2y ago
theres no errors
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
errors are there it forces deployment again and again
Brody
Brodyβ€’2y ago
well then remove the cluster stuff
gnuumer
gnuumerOPβ€’2y ago
and then when I click why, i get this
gnuumer
gnuumerOPβ€’2y ago
elaborate abit what exactly you want me to get rid of?
Brody
Brodyβ€’2y ago
why do you have cluster stuff
gnuumer
gnuumerOPβ€’2y ago
you mean those multiple services or?
Brody
Brodyβ€’2y ago
cluster.fork(); why
gnuumer
gnuumerOPβ€’2y ago
where is that?
Brody
Brodyβ€’2y ago
app.js
gnuumer
gnuumerOPβ€’2y ago
that part wasnt written by me. youre saying to remove all of it? and why exactly?
Brody
Brodyβ€’2y ago
its dumb stuff but first
gnuumer
gnuumerOPβ€’2y ago
allright, I'll do it for test
Brody
Brodyβ€’2y ago
set restart policy to never
gnuumer
gnuumerOPβ€’2y ago
allright
Brody
Brodyβ€’2y ago
dont remove code yet though its still very much spagetti
gnuumer
gnuumerOPβ€’2y ago
yeah, im doing it in that order sorry about that πŸ˜„
Brody
Brodyβ€’2y ago
who wrote it, if you didnt
gnuumer
gnuumerOPβ€’2y ago
i have 4 (3) members in the team i only do the backend stuffs thats where the "issue" is anyhow
Brody
Brodyβ€’2y ago
you are not on the teams plan though?
gnuumer
gnuumerOPβ€’2y ago
I am
Brody
Brodyβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
should be? oh yeah, I was on the teams plan, but then it didnt work and I had to enable my own starte rplan
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
teams there anyhow
Brody
Brodyβ€’2y ago
got it youre safe
gnuumer
gnuumerOPβ€’2y ago
im just an amateur im not a criminal trust me πŸ˜„ i set it to never redeploy, but its restarting anyhow
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
so must be a crash forcing it to do so
gnuumer
gnuumerOPβ€’2y ago
Brody
Brodyβ€’2y ago
okay remove the cluster code
gnuumer
gnuumerOPβ€’2y ago
I did just that
gnuumer
gnuumerOPβ€’2y ago
it redeployed and then immediately restarted
Brody
Brodyβ€’2y ago
send new code?
gnuumer
gnuumerOPβ€’2y ago
do you want the logs from the deploy?
gnuumer
gnuumerOPβ€’2y ago
allr
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
short enough to put here
Brody
Brodyβ€’2y ago
okay, logs please
gnuumer
gnuumerOPβ€’2y ago
incoming
gnuumer
gnuumerOPβ€’2y ago
but same issue persists any chance this could be with the postgres after all?
Brody
Brodyβ€’2y ago
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 5432
}
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 5432
}
this is a postgre error, yes
gnuumer
gnuumerOPβ€’2y ago
if it helps (its obvious): if i restart the service, its a crash yeah
Brody
Brodyβ€’2y ago
you have this code in a repo right?
gnuumer
gnuumerOPβ€’2y ago
i do on my branch
Brody
Brodyβ€’2y ago
what branch do you have the service linked to
gnuumer
gnuumerOPβ€’2y ago
exactly that
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
Brody
Brodyβ€’2y ago
okay, remove that entire service
gnuumer
gnuumerOPβ€’2y ago
you sure? πŸ˜„ just to double check
Brody
Brodyβ€’2y ago
yep, remove it
gnuumer
gnuumerOPβ€’2y ago
aight
Brody
Brodyβ€’2y ago
then create an empty service and setup your variables, and link the repo and set the branch
gnuumer
gnuumerOPβ€’2y ago
I'll take a quick bathroom break and do exactly that thank you really for your fortitude in trying to help πŸ˜„
gnuumer
gnuumerOPβ€’2y ago
logs just before it crashed if that helps
gnuumer
gnuumerOPβ€’2y ago
it still somehow tries to redeploy it on and on even though its crashed and set to never
Brody
Brodyβ€’2y ago
have you set up your variable references and added the api keys
gnuumer
gnuumerOPβ€’2y ago
yup
gnuumer
gnuumerOPβ€’2y ago
Brody
Brodyβ€’2y ago
do you see this anywhere anymore?
gnuumer
gnuumerOPβ€’2y ago
yes, exactly the same error pops up and forces the redeployment
Brody
Brodyβ€’2y ago
why dont i see it in here
gnuumer
gnuumerOPβ€’2y ago
its before the crash from the other deployment log
gnuumer
gnuumerOPβ€’2y ago
Brody
Brodyβ€’2y ago
i only care about the most recent
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
allright, well that it the most recent this
Brody
Brodyβ€’2y ago
i dont see that console log for the database_url
gnuumer
gnuumerOPβ€’2y ago
its in the other log
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
its there
Brody
Brodyβ€’2y ago
okay and why is railway deploying different versions of your code
gnuumer
gnuumerOPβ€’2y ago
and its constantly updating those successful database connections. so I am quite sure this must be an issue with the posgres on render its not at all
Brody
Brodyβ€’2y ago
then why are there two different logs
gnuumer
gnuumerOPβ€’2y ago
the other one is like this:
gnuumer
gnuumerOPβ€’2y ago
i figure its just the relevant parts snipped there
gnuumer
gnuumerOPβ€’2y ago
but if youre positive that doesnt happen well then... then that could be the issue likely
Brody
Brodyβ€’2y ago
?
gnuumer
gnuumerOPβ€’2y ago
because the other is the deploy log I see when its relaunching and the other one is the actual "normal" one with no immediate errors whatsoever
Brody
Brodyβ€’2y ago
show me a screenshot of the metrics please
gnuumer
gnuumerOPβ€’2y ago
forcibly redeploying gotcha
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
Brody
Brodyβ€’2y ago
um 1. why does it use 2.6gb 2. how can it use 2.6gb, you are on the free plan
gnuumer
gnuumerOPβ€’2y ago
im not on the free plan, the service is paid by someone who has put more money into it. I am developing it as to why it uses 2.6gb, it can be the load from the APIs, but still its high I will send you the error log now from the deployments Deploy Logs
Brody
Brodyβ€’2y ago
full browser screenshot of project please
gnuumer
gnuumerOPβ€’2y ago
aight
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
anything specific?
Brody
Brodyβ€’2y ago
free plan
gnuumer
gnuumerOPβ€’2y ago
thats not what the project runs on though its just my account
Brody
Brodyβ€’2y ago
youre deploying this under the teams account?
gnuumer
gnuumerOPβ€’2y ago
my account connected to the teams yeah
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
that i believe would imply it that it has the team there
Brody
Brodyβ€’2y ago
screenshot of dashboard please
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
theres teamplan
gnuumer
gnuumerOPβ€’2y ago
Brody
Brodyβ€’2y ago
you gotta change that name lmfao
gnuumer
gnuumerOPβ€’2y ago
which name?
Brody
Brodyβ€’2y ago
fertile
gnuumer
gnuumerOPβ€’2y ago
ill pass the suggestion upwards I think its nice how can railway just decide to redeploy at crash even though i set it to never?
Brody
Brodyβ€’2y ago
im sorry, i give up but good news
gnuumer
gnuumerOPβ€’2y ago
throw me
Brody
Brodyβ€’2y ago
your on teams plan ask the team πŸ™‚
gnuumer
gnuumerOPβ€’2y ago
do you think I can contact them here?
Brody
Brodyβ€’2y ago
id ping them, but they are both idle
gnuumer
gnuumerOPβ€’2y ago
can I use this thread? just asking about the methods normally used
Brody
Brodyβ€’2y ago
yeah this thread is fine, ill ask them in mod chat, no promises on when someone will be able to help you though
gnuumer
gnuumerOPβ€’2y ago
gotcha thanks for your effort!
Brody
Brodyβ€’2y ago
sorry i couldnt help
gnuumer
gnuumerOPβ€’2y ago
ah, server prohibits pinging them i tried angelo and jitachi, theyve the team plan tag
Brody
Brodyβ€’2y ago
yeah do not ping the team under any circumstance against the server rules
Ray
Rayβ€’2y ago
Heya. I’ll look into this shortly
gnuumer
gnuumerOPβ€’2y ago
hey, thanks alot! I'm here if you need me the code or else, though I am quite certain the code should run, the issue must be at the DB configurations end or alike ;/
Ray
Rayβ€’2y ago
just read through this, so the issue is you're unable to connect to Postgres even though everything seems to be correct? ah it's the restarting issue.. FYI I deleted a bunch of messages in this thread + the zip you uploaded that contains your Postgres creds and a bunch of API keys
gnuumer
gnuumerOPβ€’2y ago
yeah, nope is it a known issue? because I really cannot find anything on my end I was ""scared"" Brody wouldnt help me otherwise, we'll setup the credentials again once we can get it working on some level of course along with SSL also rc it does interest me as well how there can be two deploy logs, because should they not be quite exactly the same if both are run with the same start command from the same repo? or is it a feature on your end to have a separate deploy log in for specific deployments
Brody
Brodyβ€’2y ago
thats what i wanna know, and thats ultimately the reason i asked the team to come assist
gnuumer
gnuumerOPβ€’2y ago
you made a fair point there, I had just accepted there were two logs and one had the issue thinking now its not that clear it should be so πŸ˜„
Brody
Brodyβ€’2y ago
yeah see why i was so confused you know the error with 127.0.0.1 in it, thats an error you would get if you created a pool with no credentials, or empty connectionString also, you are creating a new pool during every import, thats why you are seeing multiple prints of connection success, so please work on getting the database pool setup correctly
gnuumer
gnuumerOPβ€’2y ago
how is that possible? yeah, but shouldnt be so :/ afaik all the queries just re-use the one pool connection?
Brody
Brodyβ€’2y ago
every time you import db/index.js it creates a new pool
Ray
Rayβ€’2y ago
I killed the container for that deployment the service was deleted and for some reason that wasn't removed
gnuumer
gnuumerOPβ€’2y ago
not showing up on my end yet... fixed that but did not affect the redeploying issue unfortunately at all
gnuumer
gnuumerOPβ€’2y ago
now theres only one. thanks @Brody πŸ™‚
Ray
Rayβ€’2y ago
did you delete the service previously?
gnuumer
gnuumerOPβ€’2y ago
once, only the backend service it did nothing unfortunately
Ray
Rayβ€’2y ago
so, the connection didn't work -> it keeps restarting -> you delete the service -> deployment still keeps restarting?
gnuumer
gnuumerOPβ€’2y ago
(PurpleBuyBot service)
Ray
Rayβ€’2y ago
@Cooper
gnuumer
gnuumerOPβ€’2y ago
yes. and it restarts even if I put restart on failure to never!
Ray
Rayβ€’2y ago
is this a CLI deploy?
gnuumer
gnuumerOPβ€’2y ago
uhh no I figure? I do it with the sites GUI elaborate on that if you can or need to
Ray
Rayβ€’2y ago
you deleted the service through dashboard? we're debugging this rn πŸ™‚
gnuumer
gnuumerOPβ€’2y ago
yes sir only used the dashboard for that, wouldnt dare to do otherwise hah
Ray
Rayβ€’2y ago
gotcha!
Brody
Brodyβ€’2y ago
it deployed from github btw
gnuumer
gnuumerOPβ€’2y ago
yes I set it from there only ever done that
gnuumer
gnuumerOPβ€’2y ago
I see. weird that it crashed
Ray
Rayβ€’2y ago
that's the ideal state, it was supposed to crash and never restart πŸ™‚
gnuumer
gnuumerOPβ€’2y ago
hahahah well it looks to be online/active now
gnuumer
gnuumerOPβ€’2y ago
gnuumer
gnuumerOPβ€’2y ago
only thing im worrying about is, does it remove the deployment just made?
Ray
Rayβ€’2y ago
no it doesn't, that happened because you pushed a new build only one deployment can be running at a time new deploy = old deploy gets removed πŸ™‚
gnuumer
gnuumerOPβ€’2y ago
ah, gotcha. just in a creepy order πŸ˜„ thanks alot guys at team and Brody
Want results from more Discord servers?
Add your server