LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 12-06-2018, 06:59 PM   #1
Klaipedaville
Member
 
Registered: Mar 2013
Posts: 80

Rep: Reputation: Disabled
Apache mod_qos. QS_SrvMinDataRate: unexpected connection status.


Hello everybody.

I would be really thankful for any help on the following.

The mod_qos in Apache 2.2.22 works for about 24 hours, then something happens and it triggers the following:

QS_SrvMinDataRate: unexpected connection status! Connections=258, cal. request rate=1182, max. limit=1200. Check log for unclean child exit and consider to do a graceful server restart if this condition persists.

There is absolutely nothing in my logs saying about unclean child exits. But this above-line keeps on filling out the logs at a rate of 1 line per second and it becomes real huge of up to 1 GB and more within minutes before I restart my apache. I am alerted that my memory is growing at incredibly high speeds! Could anybody advise please, where the problem could possibly be? Then after I restart my apache it goes back to normal operations for about another 24 hours and then this scenario repeats all over again.

I would highly appreciate any comments / assistance / suggestions. Many thanks in advance!
 
Old 12-06-2018, 10:30 PM   #2
hrfister
LQ Newbie
 
Registered: Jan 2008
Posts: 25

Rep: Reputation: 0
Klaipedaville,

If you already know what the log error is and it is the same log error, for the time being, create a bash script to clear that file and set up a cronjob to run it every 30 minutes.

First create a bash script , say something like clear_log.sh. Inside put in a command on one line similar to this:

Code:
cp /dev/null /full/path/to/log/file/somelogfile.log
save/close

This command will clear that log no matter how full it is. Then make sure you give access permission for it to run with chmod...

#chmod 755 clear_log.sh

Open crontab

#crontab -e

Add a line similar to this:

Code:
15 0 * * * /full/path/to/clear_log.sh
save/close


This will allow you to step away and not worry about your disk space getting full from the log getting big fast until you fix your problem.

***NOTE: This is only a temporary solution until you resolve the root cause of your issue***

Once you resolve the problem, make sure you edit the crontab file and remove the line that is running that script to clear the log every 15 minutes. I had to do something similar in the past until the problem was resolved and it worked great. By making the simple bash script, you can always run it manually too whenever you want, meaning you don't have to wait for the 15 intervals before cronjob runs the bash script.

#./clear_log.sh

Now the QoS error that are reporting could be a bug, but I would start by checking the usage of your other resources, memory/cpu to see if you are not getting hit hard by incoming traffic. Anything out of the ordinary? Have you tried netstat -an , or lsof to check for malicious activity? How does the Apache access.log look? Is this a public facing server? If so, are you using any load balancing? Have you made sure your firewall is configured correctly?

Last edited by hrfister; 12-06-2018 at 10:31 PM.
 
Old 12-07-2018, 11:20 PM   #3
Klaipedaville
Member
 
Registered: Mar 2013
Posts: 80

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hrfister View Post
...Now the QoS error that are reporting could be a bug, but I would start by checking the usage of your other resources, memory/cpu to see if you are not getting hit hard by incoming traffic. Anything out of the ordinary? Have you tried netstat -an , or lsof to check for malicious activity? How does the Apache access.log look? Is this a public facing server? If so, are you using any load balancing? Have you made sure your firewall is configured correctly?
Thank you for replying. I appreciate.

All the above is checked and set, such as iptables' rules and pretty much everything else you mention. When I turn off this mod_qos everything goes back and resumes normal operations. I think It's just either a bug of mod_qos or I do not really understand its setting of QS_SrvMinDataRate. You see the manual says that it's min.data bytes rate per second but with min. and max. data set. For example QS_SrvMinDataRate 150 10800. It's minimum is clear and works, but when it reaches its maximum of 10800 qos goes dead and starts flooding the logs like crazy. However, if you do not set any maximums then it works OK (I found it experimenting by trial and error and that is pretty much what the manual says, default is zero). It looks like when you set this maximum there is some counter that triggers and starts counting 1,2,3.. and as soon as it reaches the number you set the mod turns itself off. How many bytes per second can your server pump in back and forth per month, per year, per 10 years? How do you figure this one out? I asked the developer and community at sourceforge as well but nobody cares to reply / hasn't replied there yet.

Here is an extract from the manual.

Quote:
QS_SrvMinDataRate <bytes per second> [<max bytes per second> [<connections>]]. The "max bytes per second" activates dynamic minimum throughput control: The required minimal throughput is increased in parallel to the number of concurrent clients sending/receiving data (starts increasing when reaching the "connections" threshold). The "max bytes per second" setting is reached when the number of sending/receiving clients is equal to the MaxClients setting. The "connections" argument is used to specify the number of busy TCP connections a server must have to enable this feature (0 by default). It is used to disable the QS_SrvMinDataRate rule enforcement on idle servers.
 
  


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
LXer: How To Defend slowloris DDoS With mod_qos (Apache2 On Debian [Lenny]) LXer Syndicated Linux News 0 07-17-2009 10:10 AM
hdc: status timeout: status=0xd0 { Busy } bagra Linux - Newbie 6 06-12-2009 02:15 PM
hda:status timeout:status = 0xd0 {Busy} dahlinkj Linux - Newbie 2 05-27-2008 06:36 PM
Installing RedHat 8.0 onto Dell PowerEdge SC1425 - hdc: status error: status = 0x58 fishsponge Linux - General 0 07-11-2006 10:02 AM
> Ftp With Exit Status, Ftp with exit status vwvr9 Linux - General 4 02-23-2005 03:53 AM

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

All times are GMT -5. The time now is 12:27 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration