title: How to debug ElasticBeanstalk error "X% of the requests are failing with HTTP 5xx"
body: <p>My problem is similar to <a href="https://stackoverflow.com/questions/32364229/aws-none-of-the-instances-are-sending-data">AWS: None of the Instances are sending data</a> but has a slightly different error message. </p>
  
  <p>I have a Rails application running on ElasticBeanstalk, and it appears to be running correctly. Periodically, Enhanced Health Monitoring sends me error messages such as:</p>
  
  <blockquote>
    <p>Environment health has transitioned from Ok to Degraded. 20.0 % of the
    requests are failing with HTTP 5xx.</p>
  </blockquote>
  
  <p>where the percentage varies up to 100%. Even though I've made no changes, a minute later I get a followup message telling me that everything is back to normal:</p>
  
  <blockquote>
    <p>Environment health has transitioned from Degraded to Ok.</p>
  </blockquote>
  
  <p>I've downloaded the full logs from ElasticBeanstalk but I don't know exactly where to look (there are around 20 different log files in various directories).</p>
  
  <p>I'm currently using the free AWS tier with the smallest instances of database, server, etc. Could this be the cause? Which of the log files should I be looking in, and what should I be looking for?</p>