applicaitons are unable to connect to rds-postgress after few hours

0

hello all,

I have a java & python based application which connects to db and stores data, I'm using postgress db (db.m5d.large) size with 12000 IOPS. Issue comes after few hours applications are unable to connect to db but if I reboot DB then able to establish connection again and work normal. So can anyone help on this what would be the cause and fix this issue.

ap
已提问 6 个月前222 查看次数
2 回答
0

Hi,

It's hard to say without additional information.

  • What the error message you have in app when trying to connect? Is it timeout or other type of error?
  • If application is not closing DB connections and initiating new it could be that you reached max connections limit
  • You need to check if anything suspicious in the DB logs or monitoring metrics
  • Check if you have latest minor version installed
  • Turn on Performance insights and check if anything suspicious there
  • Turn on GuardDuty for DB

It must give you a starting point for troubleshooting, if not helped feel free to provide more details.

profile picture
专家
已回答 6 个月前
  • thank you for providing some insight, I will check on last 5th & 6th point GuardDuty for DB & Performance insights for suspicious. But to answer your question,
    point#1 => unable to accquire db connection (attached screenshot as well.) point#2 => I saw the connections as well it was not going beyond 50, so I don't think its issue with connection limits. point#3 => checked db monitoring as well, I saw there EBSByteBalance% & EBSIOBalance% showing almost 99%+. point#4 => recently launched db, so nothing upgraded till now. If you need more details then please let me know and help me.

  • Could you please show the settings of Security Group(s) attached to the RDS DB?

  • Hi Sirant, Sorry for late response, following are my observations -

    my security group allows all traffic to the vpc cidr address i.e (10.0.0.0/16) and application is deployed in the same vpc.

    RDS is in private subnet
    Application is in public subnet So application is starts up and run for some hours may be 24-30 hours or more then that but after sometime if application want to connects to db at that time it fails so at that time tried 2 things i.e -
    restarting application -> after restart application doesn't come up and it get stuck at the connection to DB (screenshot attached above)
    restarting DB -> if DB is restarted then application starts creating connection and boots up runs fine. My DB configuration is db.m5d.large and connections goes up to 35-40 max. Can you tell me what could be the issue here ?
    
0

point#1 => Enter image description here point#3 => Enter image description here

ap
已回答 6 个月前
  • These metrics in a good state, there is no problem.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则