Annoying LFD on Excessive resource usage

I’ve been bombarded with lots of LFD messages lately and its getting annoying. While most people tend to ignore these messages, it might be something worthy to be investigated. After all LFD flagged it as a warning so there must be some sort of a problem.

Here is a sample of what LDF sent me:

Time: Wed Nov 27 05:06:00 2013 +0800
Resource: Process Time
Exceeded: 1734997 > 1800 (seconds)
Executable: /usr/bin/php
Command Line: /usr/bin/php /home//public_html/index.php
PID: 21636 (Parent PID:13377)
Killed: No

From the log, we can tell for sure that its a PHP script and we can’t disable PHP so we need to find something else. I know this file being loaded is WordPress index but we can’t disable it either. We should first investigate the process ID using the command below:

lsof -p 21636

Most of these problem are memory related and can be fixed by increasing the physical memory or by increasing the memory limit threshold at LFD by

WHM > ConfigServer Security & Firewall > PT_USERMEM

increase the limit from 200 to shall we say 320 or more.

while i was investigating i found the line with the most memory usage was the language file and its a bit too high at 93MB, i mean how many languages are we talking here?

php 18327 username mem REG 0,209 93866928 92021732 /usr/lib/locale/locale-archive-rpm

so i decided to trim it to use just the language ‘en_US’ and delete the others

$ localedef --list-archive | grep -v -e "en_US" | xargs localedef --delete-from-archive
$ mv /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl
$ build-locale-archive

That was a 90MB drop so warnings should have stopped by now and i can now read my mails without pulling my hair and having a heart attack.

  1. How did you discover that it was the language file what software did you use, I am pulling my hair out trying to discover just where my Excessive resource usages are coming from.
    Thanks in advance gary

    • you use top to get the list of processes currently running.

Leave a Reply