Slow Response from Main Page, high CPU usage



  • Let me start by apologizing…  I'm sure I won't be providing enough detail- please let me know what information you'd like me to provide.

    Lately I've been noticing lots of problems where the main pfsense page is exceedingly slow to respond.  It will open, but it often takes several seconds.  I've noticed that if I pull up the system activity page in one tab/window as I try to go to the main page in another, I notice 1-2 lines like the following:

    30983 root 52 0 17144K 2656K wait 0 0:00 0.88% sh -c /usr/bin/grep -vi warning /tmp/PHP
    

    Often, these will have CPU usage in the 20-40% range for a couple seconds, before coming back down.  After the main page loads these go away.

    I'm running pfSense v2.2-release, with snort, OpenVPN, ntopng, and darkstat running. pfblockerng is installed, but disabled.

    I didn't notice this problem until I upgraded from one of the mid-January release clients.  I can't necessarily say it wasn't happening before, as I wasn't looking for it, but I think I would have noticed it.

    Any ideas?  What other diagnostic information should I provide?



  • The dashboard (/usr/local/www/index.php and friends…) uses grep to check in /tmp/PHP_errors.log for any issues reported by PHP scripts. This is done each time when navigating to the dashboard, hence the grep process that will come and go.



  • Does your /tmp/PHP_errors.log file have any contents? That grep should be a trivial amount of CPU in normal circumstances, that makes me wonder if your PHP_errors.log is filling up for some reason.



  • @cmb:

    Does your /tmp/PHP_errors.log file have any contents? That grep should be a trivial amount of CPU in normal circumstances, that makes me wonder if your PHP_errors.log is filling up for some reason.

    Ahhh, thanks, cmb and phil.  This was exactly it.  It looks like the PHP_errors.log was a little over 2 gigabytes large.  Unfortunately, I lost the file before I could look at it.  Before I realized it was so large, I tried to open it using the WebGUI file editor.  Shortly thereafter, that caused a crash, which cleared the file.

    I guess I'll keep a close eye on the file.  Whatever happened happened pretty quickly over the last week.  I noticed a couple days ago that my system was using a lot more storage than it did a week ago.  I attributed it mostly to the backup I made when I upgraded to the 2.2-release, but I knew that didn't explain everything.  This log file explained the rest.

    Is there anything I can/should do in the meantime?



  • Keep an eye on that file, if it has anything in it, post back with its contents.


Log in to reply