Skip to content

EC2 instance status check failed while system and EBS checks passed, causing ALB 504 timeout

0

Hello AWS Community,

We experienced an availability issue with an EC2 instance hosting our production application.

Environment Service: Amazon EC2 behind an Application Load Balancer Operating system: Linux Application: Java-based services Instance state during the incident: Running Incident start: Approximately July 10, 2026, after 6:00 PM IST Recovery action: EC2 instance reboot Symptoms observed

Users received the following error while accessing the application:

504 Gateway Time-out

The EC2 instance showed only 2 of 3 status checks passed:

System status check: Passed Instance status check: Failed Attached EBS status check: Passed

The Application Load Balancer could not receive a response from the backend instance.

CloudWatch metrics showed normal CPU utilization, but network traffic dropped significantly after the incident began.

When we attempted to retrieve the EC2 instance screenshot, the console displayed:

Cannot fetch screenshot: Instance still being initialized or graphics mode not supported

The EC2 system log only contained repeated messages similar to:

/etc/rc.d/rc.local is not marked executable, skipping.

No obvious kernel panic, filesystem, or AWS infrastructure error was visible in the console system log.

Recovery

We rebooted the EC2 instance. After the reboot:

All three EC2 status checks passed The application services started successfully The load balancer target became healthy The application became accessible again The 504 error was resolved Questions

We would like help understanding the possible root cause:

What commonly causes an instance status check to fail while the system and EBS checks continue to pass? Can an operating-system hang, memory exhaustion, network-stack issue, or Java resource issue cause this condition? Is the rc.local is not marked executable warning likely to be related, or is it only an informational startup warning? Is there any AWS-side telemetry available to determine whether the instance experienced a Nitro, host, networking, or hardware issue? Which CloudWatch metrics or operating-system logs should we monitor to identify the exact cause if this happens again? What preventive measures are recommended for production EC2 instances to avoid this type of outage?

We are reviewing the previous boot logs using:

sudo journalctl --list-boots sudo journalctl -b -1 --no-pager sudo journalctl -k -b -1 --no-pager

sudo journalctl -b -1 --no-pager | egrep -i "oom|out of memory|killed process|hung task|panic|segfault|watchdog|i/o error|xfs|ext4|nvme"

Any suggestions for additional investigation would be appreciated

asked a month ago58 views

2 Answers
2

In addition to the re:Post Agent's response, there is a technical clarification regarding the recommendation to "monitor CloudWatch metrics for memory utilization."

EC2 does not provide guest operating system-level metrics, such as memory or swap utilization, by default. The standard hypervisor only tracks CPU, network I/O, and disk I/O. If a Java application caused an Out of Memory (OOM) condition leading to the instance status check failure, you will not see this reflected in your default CloudWatch console.

To gain visibility into memory consumption and proactively alert on the resource exhaustion that likely caused this hang, you must install and configure the unified Amazon CloudWatch Agent on your Linux instance.

You can find the official AWS documentation and the steps to collect these internal system-level metrics here: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html

Without this agent, you will have a blind spot regarding memory leaks, making it difficult to set up the preventive alarms mentioned in the previous answer.

EXPERT

answered a month ago

EXPERT

reviewed a month ago

0

Based on the symptoms you described, an instance status check failure while system and EBS checks pass typically indicates an issue with the instance's software configuration, operating system, or application layer rather than underlying AWS infrastructure or storage problems.

Common causes for this specific failure pattern include:

Instance status checks can fail due to incorrect networking or startup configuration, exhausted memory, corrupted file systems, or incompatible kernels. Since your system status check passed, this rules out AWS infrastructure issues like loss of network connectivity, system power, or hardware problems on the physical host. The passing EBS check confirms your storage volumes were reachable and completing I/O operations normally.

Regarding your specific questions:

Yes, operating system hangs, memory exhaustion, network stack issues, or Java application resource problems can all cause instance status check failures. When an instance becomes unresponsive due to these issues, it may still appear "running" but cannot properly respond to health checks or serve traffic, resulting in the ALB 504 timeouts you observed.

The "rc.local is not marked executable" message is typically just an informational startup warning and unlikely to be the root cause of your instance becoming unresponsive, though it's worth ensuring your startup scripts are properly configured.

For investigation and prevention:

To identify the root cause if this recurs, monitor CloudWatch metrics for memory utilization, disk I/O, and network performance alongside CPU. The dropped network traffic you observed is a key indicator. Within the operating system, examine logs for Out of Memory (OOM) messages, kernel panics, or application-specific errors using the journalctl commands you're already running.

Your approach to reviewing previous boot logs is correct. Pay particular attention to any OOM killer messages, Java heap exhaustion errors, or network interface issues that occurred before the instance became unresponsive.

Preventive measures for production instances:

Consider implementing CloudWatch alarms for critical metrics including memory usage, status check failures, and application-specific health indicators. Configure your ALB health checks appropriately and consider using Auto Scaling to automatically replace unhealthy instances. Ensure your Java application has appropriate memory limits configured and monitor for memory leaks. Regular review of system logs and application logs can help identify issues before they cause outages.

The inability to retrieve a screenshot when the instance was unresponsive suggests the instance's operating system or graphics subsystem was not functioning properly, which aligns with an OS-level or application-level hang rather than an AWS infrastructure issue.
Sources
Status checks for Amazon EC2 instances - Amazon Elastic Compute Cloud
Understand why EC2 instance stopped | AWS re:Post

answered a month ago

EXPERT

reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.