Home » Questions » Computers [ Ask a new question ]

python 3.x - could not connect to server:Connection refused (0x0000274d/10061) is the server running on host"<SERVER>"

python 3.x - could not connect to server:Connection refused (0x0000274d/10061) is the server running on host"<SERVER>" and accepting TCP/IP connection on port 5432 -

"I am trying to use postgresql remotely from my server. I had already configured ""postgresql.conf"" and make it listen to all ""localhost = ""*"" and also configured ""pg_hba.conf"" and added ""host all all 0.0.0.0/0"" in ipv4 connection. It connects to the server without any problem but if I tried to upload a data after some times, it says connection refused. then I restart postgresql using putty by using the command ""sudo systemctl restart postgresql"" then it runs. I need a solution to avoid manual restart. it should always accept the connection 24/7.
plse help me.
I read almost every similar question in but nothing helped me.





python-3.x postgresql












ShareShare a link to this question Copy linkCC BY-SA 4.0




Follow
Follow this question to receive notifications











asked 2 mins ago





Kiran ShankarKiran Shankar

111 bronze badge"

Asked by: Guest | Views: 87
Total answers/comments: 0