SAP Application Server Auto Scaling — Solve Out-of-Memory Errors
A company runs SAP Business Suite on AWS. The SAP system frequently crashes with a 'JAVA out of memory' error. The application server is an EC2 instance with 32 GB RAM. Which solution should be implemented to prevent this issue?
Quick Answer
A JAVA out of memory error on a fixed-size application server is fundamentally a capacity problem, and the fix that actually prevents recurrence is one that adds capacity automatically rather than just delaying the same failure. Configuring CloudWatch alarms to trigger EC2 Auto Scaling based on memory utilization means that as memory pressure builds on the existing instance, new application server instances are launched automatically to absorb additional load, which spreads user sessions and processing across more servers so no single instance is pushed into exhausting its Java heap space. This is structurally different from the alternatives: manually increasing the EC2 instance's memory is a one-time workaround that doesn't respond to future growth in load and still requires someone to notice and act; shrinking the Java heap size would actually make out-of-memory errors more likely, not less, since it reduces the memory available to the application; and increasing swap space just trades an out-of-memory crash for severe performance degradation, since swapping memory to disk is drastically slower than RAM and doesn't solve the underlying capacity shortfall. The broader lesson is that recurring resource-exhaustion errors on a single instance are usually a signal that the architecture needs horizontal scaling, more instances responding to demand, rather than vertical tuning of the one instance that's already struggling. When you see repeated out-of-memory or resource-exhaustion symptoms tied to load, look for the automated horizontal-scaling answer.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Configure Amazon CloudWatch alarms to trigger EC2 Auto Scaling based on memory utilization
By configuring Amazon CloudWatch alarms to trigger EC2 Auto Scaling based on memory utilization, the system can automatically add more application server instances when memory usage is high. This distributes the load and prevents any single instance from running out of Java heap space. Option A is incorrect because manually increasing the EC2 instance memory is a temporary workaround that does not scale automatically. Option B is incorrect as reducing the Java heap size would increase the likelihood of out-of-memory errors. Option C is incorrect because increasing swap space can cause severe performance degradation and does not resolve the underlying memory shortage.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Increase the EC2 instance memory to 64 GB
Why it's wrong here
Temporary fix; doesn't scale automatically.
- ✗
Reduce the Java heap size in the SAP system
Why it's wrong here
Would increase crashes due to insufficient heap.
- ✗
Increase the swap space on the EC2 instance
Why it's wrong here
Swap is slower; not a long-term solution.
- ✓
Configure Amazon CloudWatch alarms to trigger EC2 Auto Scaling based on memory utilization
Why this is correct
Auto scaling adds capacity when memory is high.
Visual reference
Go deeper
Related to this question
About these practice questions
This PAS-C01 question is part of Courseiva's 1,616-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on PAS-C01
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Your company runs SAP Business Suite on AWS. The system has a three-tier architecture with a web dispatcher, application servers, and a HANA database. The operations team has been receiving alerts about high CPU usage on the application servers during peak hours. The application servers are currently running on m5.large instances. You need to ensure consistent performance without over-provisioning. What is the most cost-effective solution?
easy- A.Add more application servers manually during peak hours
- B.Upgrade all application servers to m5.xlarge instances
- C.Use reserved instances to lower cost but keep existing instances
- ✓ D.Configure Auto Scaling with a step scaling policy based on CPU utilization
Why D: Configuring Auto Scaling with a step scaling policy based on CPU utilization automatically adds or removes application servers in response to demand. This ensures consistent performance during peak hours without permanently over-provisioning resources, making it the most cost-effective solution. Option D is correct.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PAS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PAS-C01 exam.