Periodic 504 with ElasticBeanstalk

We’re running Metabase on aws elastic beanstalk. Followed the standard directions to deploy the docker image to EB, etc.

About every 4-5 weeks, the metabase instance becomes inaccessible, always giving a 504 error in the browser. Rebooting or creating a new ec2 instance inside the beanstalk app never helps. Also the beanstalk app itself thinks the health is “OK” (i.e. I guess it can hit the ping url), but users always get 504s.

This happens regularly about once a month or so. The only solution that works is to snapshot the database and then completely reinstall to a new beanstalk app from the restored snapshot.

Has anyone seen this as well, and is there a known solution?

I’m seeing this problem as well.