LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-19-2010, 02:32 AM   #1
amir1983
LQ Newbie
 
Registered: Sep 2010
Posts: 1

Rep: Reputation: 0
Abrupt increase in server load upto 300 !


Hi,

I run a server with nginx at the front and apache at the background. Nginx serves as a reverse proxy in here. As there were lots of DOS attacks, I have implemented Deflate-DDOS, APF and Nginx anti-ddos features and the server runs without a problem.
Once every month, the load on server increases upto 300 and I receive an email like this :

Subject : Cron <root@server> [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm

Content :
find: `/var/lib/php5/sess_0ca40520ac8ecb66090746f90da17516': No such file or directory
find: `/var/lib/php5/sess_3839b0cbf042934183d56ff682c948e0': No such file or directory
find: `/var/lib/php5/sess_dec1ed8ea1f62caf7a42a29b9f82c506': No such file or directory
find: `/var/lib/php5/sess_0532eaf082ace26a36c224a552498a83': No such file or directory
find: `/var/lib/php5/sess_2833be4f2aab6eaef84340d8f6446ab8': No such file or directory
find: `/var/lib/php5/sess_afd6ef56150a9aa389c170fb82f660c8': No such file or directory
find: `/var/lib/php5/sess_6bb00f227bce3710ebc4db2380a42e06': No such file or directory
find: `/var/lib/php5/sess_d766e7932cc2616a3a8895c5b21900a1': No such file or directory
....

There's more that 100,000 ( I suppose ) lines on this email. I have no idea what the problem is. It seems there's something with the session, but I really don't know what it is.
I would appreciate if anyone can help
Thanks in advance
 
Old 09-20-2010, 04:33 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
Quote:
Originally Posted by amir1983 View Post
Once every month (..) php5/maxlifetime (..) There's more that 100,000 lines on this email.
Check your PHP documentation for session data storage and related garbage collection. Decide how long sessions need to remain active and check that with your php.ini "session.gc_.*" variables, change the 'find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm' line to read 'find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 2>/dev/null | xargs -n 200 -r -0 rm 2>/dev/null' (redirect errors to the bit bucket) and change the cronjob to run more often (the more gradual operations are done the less strain it puts on the system).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
logs for abrupt shuddown rashmeepawar Linux - Server 6 09-23-2009 09:33 PM
How to increase load average on Linux. beckss Linux - Server 5 12-08-2008 08:53 AM
Script to cause load average to increase paranoid times Linux - Software 2 04-14-2006 05:41 PM
mail server and mandrake 9 on Pentium 300? WannaLearnLinux Linux - Newbie 4 08-20-2003 08:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration