Scenario:
While using EC2 instances built by Quickstart Template (https://aws.amazon.com/quickstart/architecture/tibco-jaspersoft/) you sometimes encounter the out of memory issues on Tomcat side. How to adjust tomcat memory allocation for these instances?
Solution:
To address the memory issues, please add below two mentioned lines in user data section of WorkloadASLaunchConfig resource in template after last line and update the stack.
"sed -i 's/JAVA_OPTS="-Dksp/JAVA_OPTS="-XX:MinRAMPercentage=25.0 -XX:MaxRAMPercentage=50.0 -Xss2m -Dksp/g' /etc/tomcat/tomcat.confn", "systemctl restart tomcatn"
After updating the stack please kill old instances and launch new one so these changes will take effect in the instances launched.
You can adjust MinRAMPercentage and MaxRAMPercentage as you see fit here.
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now