vixon

Active Member
Sep 23, 2009
32
0
56
Estonia
cPanel Access Level
Root Administrator
Hello,

From time to time our servers hang due to Apache memory leak on some websites (basically gallery sites).
Also this same sites, which cause the overloading can normally work for weeks but then suddenly crash the server. Average load of the servers is not high ~2.30.

As I have understand CloudLinux Memory limit doesn't affect Apache processes and there is no any option to prevent such kind of swapping in "LVE Manager". Am I correct ? What server settings should we check and how to solve the issue ?

Please see the screenshot to get the better view of the trouble.

ffs.png

Kernel version: 2.6.18-374.3.1.el5.lve0.8.44

Apache modules:
Compiled in modules:
core.c
mod_authn_file.c
mod_authn_default.c
mod_authz_host.c
mod_authz_groupfile.c
mod_authz_user.c
mod_authz_default.c
mod_auth_basic.c
mod_include.c
mod_filter.c
mod_deflate.c
mod_log_config.c
mod_logio.c
mod_env.c
mod_expires.c
mod_headers.c
mod_unique_id.c
mod_setenvif.c
mod_version.c
mod_proxy.c
mod_proxy_connect.c
mod_proxy_ftp.c
mod_proxy_http.c
mod_proxy_scgi.c
mod_proxy_ajp.c
mod_proxy_balancer.c
mod_ssl.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_info.c
mod_suexec.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_rewrite.c
mod_so.c
PHP 5 Handler suphp
Apache suEXEC on
Any help will be highly appreciated!
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
I did want to mention that if you use DSO + mod_ruid2 for Apache (only currently available in EDGE 11.31 EasyApache for mod_ruid2), then all processes being run by the user even images or basic html pages will show up as that user when viewing processes. Additionally, they would then show up in WHM's Daily Process Log and be able to be limited by CloudLinux.

If the basic gallery is overloading due to images being loaded frequently (possibly very large images or even flash-based content), then the choices via cPanel itself are to limit requests using mod_qos (in EasyApache), to use mod_deflate (in EasyApache) to reduce file content sizes (once enabled you can then add it for an account in cPanel > Optimize Website area), or to use mod_ruid2.
 

Jay M

Active Member
PartnerNOC
Oct 10, 2011
43
0
56
cPanel Access Level
Root Administrator
Hi vixon,

Could you please keep us updated on how you go with this?
I believe we saw similiar issues when we were running CL 5.7 with memory limiting enabled, when we disabled it this issue went away.

Cheers
 

vixon

Active Member
Sep 23, 2009
32
0
56
Estonia
cPanel Access Level
Root Administrator
Thanks for your replies!

We are using suphp handler for many years already and wouldn't like to switch it with dso. We will try to turn "Website's optimization" next time and investigate the issue over again.

I believe we saw similiar issues when we were running CL 5.7 with memory limiting enabled, when we disabled it this issue went away.
CL memory limit was disabled during the crash and we keep it disabled on all of our servers.

Another question, may be should we decrease the value of RLimitMEM ? Currently it's 2357604352.
If you are using cPanel/WHM then you've got an option in your WHM to limit memory usage by apache processes (RLimitMEM), the option is under Security -> Modify Apache Memory Usage.

This option executes the script: /scripts/apachelimits. It works fine on dedicated systems, it reads the /proc/meminfo file for the currently installed memory and sets the limit accordingly.