[AWS] Error 502 Bad Gateway

Recently every 2 days my application with Strapi deployed on AWS is showing the error 502 bad gateway. When I change the free RDS master password the application works again. Does anyone know what could be happening?

  • Node.js version: 12.22.6
  • NPM version: 6.14.15
  • Strapi version: 3.6.5
  • Database: PostgreSQL 10.8 (RDS db.t2.micro)
  • Operating system: Ubuntu 18.04.5 LTS (GNU/Linux 5.4.0-1078-aws x86_64)