How can i kill a process running on 8080 port?
Need to close all services which is running on 8080 port
49 Replies
Project ID:
51daab5a-0ac8-4391-b20d-16bf067e9c82
You might find these helpful:
- Application Error (App not correctly listening to $PORT)?
- Server error
- Stop a service
⚠️ experimental feature
51daab5a-0ac8-4391-b20d-16bf067e9c82
why? what errors do you get that lead you to believe that that is the solution to your problem?
looks like a previous service is running
which is causing an error
screenshot of error please?
Basically i am running a cron which is making an entry to db
the problem is even if i stopped my service it is making an entry into database
There is no screenshot
of error
gotcha
what database is this cron job entering data into?
postgres
on railway?
yes
and you are absolutely positive you dont have this app running anywhere else? locally or in another project?
Yes! I am
or on another hosting platform
Database connection i have used only two places, one is for inserting record using cron job another is for reading the record
both services are running on Railway only
I am not using locally
and the service that reads the records, will never enter anything?
correct, it will not enter anything
even i have changed database credentials, but after that also inserting the record
today what i did is I have change env variable name
which I have used to make connection with DB
show me a screenshot of your service variables for the service that enters data?
probably should use variable references going forward, but that wouldn’t have anything to do with this
have you
Reset Database Credentials
in the database plugins settings?yes, I have reset database credentials
and you could remove the service and data would still be entered?
yes
because db connection i have made using env vars
so it does not matter if you change crediential
the env vars is the same
ohhhhhh
so today what I am going to do is
changing env vars
that would have been handy to know
you hardcoded the database url into your service
my guts is somewhere in railway service is running
correct?
No there is no hard code, i am using POSTGRES_DB_URL env variable to connect db
is it possible for you to check running services using terminal
there is no railway terminal
oh
I am changing env vars let see it will help or not
one more issue is terminal is not closing after successfully deployment
see its deployed but
now this sounds like a phantom container, but if you changed the database credentials, the phantom container would now be using the wrong credentials and ideally would be able to add data with incorrect credentials
please use variable references, you should never be copy-pasting any database credentials when setting up variables on railway services
how we can use it
got it
then show me the service variables after youre done please
sure
perfect
now go to the settings of the database and restart it, hopefully this will kill all active connections to the database, thus killing the connection that the suspected phantom container has open
ok
done
how often does this cron job run?
after 9:30 IST it will run @ every 5 min if data found will be inserted
how long until then?
till 4 PM IST
I'm sorry but I'm not doing time zone conversions, how many hours until the next cron job runs?
within 1 hour
okay so after the cron job runs, come back to tell me the verdict
sure