I am currently using AWS's free tier. I am receiving the error message:

could not connect to server: Connection timed out (0x0000274C/10060) Is the server running on host "xxxxxxxxx" (-) and accepting TCP/IP connections on port 5432?

This has happened twice now with 2 different databases. Each time after creating the DB on AWS, they both worked perfectly fine for 4 or 5 days without any connection issues. I have not changed any settings in pgAdmin, psql, or AWS since creating the two databases, so I am unsure of the cause.

EDIT: I just logged into pgAdmin, and now I can connect. I guess my updated question is 'has anyone had this problem with AWS'? I did absolutely nothing aside from checking the firewall as dezso suggested, and this was 4 hours after I restarted the database and still couldn't connect. Also, just to clarify, the database was definitely available after restarting it when I tried to, but couldn't connect the last time.


It has once again temporarily stopped connecting and no settings have changed.

  • 1
    Is the DB running? The fix IP public/accessible and from where you try? Any firewalls set up along the route? – dezso Mar 27 '17 at 19:07
  • It is running, It is publicly accessible and using rds-launch-wizard-1 without any settings having been changed since it was previously connecting in psql and pgAdmin. I executed 'netstat -a -n' and did not see port 5432 listed. I have tried rebooting the db on aws, but that did not help either. – Min Mar 27 '17 at 21:56
  • I know it sounds dumb, but are you sure you are connecting to the DB you think you are connecting to? The netstat output suggests that at least the port is not open. This might be due to the DB not running, among others. – dezso Mar 28 '17 at 12:26
  • Yes I am positive as I purposely put the latest one I am working on as the only one that automatically remembers my password in pgAdmin because I previously thought that I may have been entering it incorrectly. It started connecting again around 4pm yesterday after not connecting for about 4 hours, and it was available in AWS during that 4 hour span. I can currently connect. I just haven't seen this exact issue with AWS posted as I am nervous about future problems. – Min Mar 28 '17 at 13:44
  • Was there ever a solution for this? – Ben Mitchell Oct 8 '18 at 3:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.