Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Timeout Errror when trying to connect to postgresql server through a python script.
Hey , i’ve been running a discord bot script on my digital ocean droplet(ubuntu 16.04) for going on 3 years now. Recently i’ve been trying to rewrite it to a newer library but for whatever reason my postgresql connect command consistently throws a Timeout Error when i try to run it from my desktop. However the same script running on the vps itself works perfectly fine for some reason.
This would lead me to think that it’s a firewall error however i have double checked and my sql server port is forwarded which is also evidenced by the fact that i can consistently use PGAdmin to view the database from my desktop.
Another point of notice is that sometimes my droplet starts acting up where even ssh'ing into it using putty times out and i have to try a handful of times before i can get in which makes me guess that it’s a digital ocean side issue ?
I have checked my internet connection and it’s stable so that’s not the issue either. I’m fairly confused about this as i’ve never had any troubles in the 3 years i’ve been using DO before this ; any insight and help is appreciated.
This is the exact error my script raises on my desktop.
TimeoutError: [Errno 10060] Connect call failed (‘my ip’, 5432)
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×