If you’re getting Internal server error all over the places on your websites on a cPanel server and PHP is configured to run as suphp CGI mode, then you might be observing the following error on error_log due to ModSecurity. It might be searching for the sticky/suid permission on suphp binary:
SecurityException in Application.cpp:188: Do not have root privileges. Executable not set-uid
To quickly get this fixed on your cPanel server execute the following command:
To limit tomcat heap memory usage we normally change the environment variables in tomcat startup scripts. cPanel allows us to take care of this by creating and adding min and max values to a file called /var/cpanel/tomcat.options (File won’t exist by default).
the “-Xms” initial Java heap size for the application to 100MB, and the “-Xmx” maximum Java heap size to 200MB. If the – is not placed in front of the option when putting the values into /var/cpanel/tomcat.options file that is created, then Tomcat will refuse to startup properly.
This method would be preferred over directly editing /usr/sbin/starttomcat. The /var/cpanel/tomcat.options file would not be edited by cPanel scripts or upon updates.