How to fix the open files limit critical alert of HANA configuration mini checks
Purpose of the blog
To help fixing the open files limit critical alert which comes in the HANA configuration mini checks. I have performed it for the HANA 2.0 SP05 Rev 59 on SLES 15 SP4 and SLES 12 SP4. This alert normally comes when we build the new HANA system or after any OS upgrade. It could lead to VM hung, SAP slowness as the open limits reach to the maximum capacity and can hamper the productivity of your SAP system.
This blog provides step by step procedure on how to resolve and fix the open files limit critical alert.
Note: Always verify the help.sap.com and your OS vendor support to get the latest updates
Steps to resolve are as per below
1. Execute the relevant HANA configuration mini checks as per your HANA DB version (download the latest SQL zip file from the SAP note 1969700, you can mark this SAP note as favourite to see the latest updates always). Once the HANA configuration mini checks are executed, check the results for the critical alerts by applying the filter of X (meaning critical) in the column named C. For e.g. Here CHID M0260 alert is of open files limit critical alert along with few other critical alert.
2. If there is no critical alert observed for open files limit in the HANA configuration mini checks, then please ignore this blog. But you can still read my blog.
3. If yes, please perform the following steps.
Edit the /etc/security/limits.conf and append the file with the below line:
sidadm – nofile 1048576
The value above is suggested in the HANA mini checks
5. Login to the OS level of SAP HANA DB and execute the below command using the sidadm user
bash -c “ulimit -a”
Fig 3. Check the open files parameter in the output, currently we see it is 1024 which is default
6. As per the requirement we need to set the open files limit parameters to 1048576.
7. To do so, login using the root user in application host via putty session, go to the path
cd /etc/pam.d/ and create a backup copy of common-session-pc
Fig 4. Create backup copy of the common-session-pc via root user
8. Edit the common-session-pc file using vi editor,
Add the below line on top of the file common-session-pc.
Please make sure you don’t make any typo here. As the server can go in inconsistent state and we can’t take the putty session (do ssh to server). To resolve this inconsistent state we require a Linux expert. So please be careful while adding the below line. Double-triple check is recommended.
session required pam_limits.so
Fig 5. Edit the common-session-pc via root user
9. Then execute the below command via the root user
ulimit -n 1048576
Then switch to sidadm user in the duplicate session and verify the below command
bash -c “ulimit -a”
Fig 6. Validate the open files limit
10. Don’t close the existing session and open the duplicate session and check if the open files limit value is in effect using sidadm
It is not yet over.
Finally take the clean restart of SAP application and HANA DB. Make sure you stop the sapstartsrv service for both SAP application and DB.
After starting the SAP, run the hana mini checks again and see if the open files limit alert.
Now the open files limit alert is no more critical.
Fig 7. Executing the SQL query HANA configuration mini check post the configuration and restart of SAP
This is it, now you are done!
Dear BASIS fellows and colleagues, please share your thoughts and feedbacks on this blog in a comment.
Till then see you in the future posts.