Author |
|
jsmoriss
Joined: 11 Nov 2012 Posts: 8 Location: Montreal QC, Canada
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 12 Nov '12 0:25 Post subject: |
|
|
H,
I get some warnings
Quote: |
Use of uninitialized value in numeric eq (==) at ./check_httpd_limits.pl line 212.
WARNING: MaxRequestsPerChild is 0. This is usually not recommended.
Use of uninitialized value in multiplication (*) at ./check_httpd_limits.pl line 248.
Use of uninitialized value in numeric eq (==) at ./check_httpd_limits.pl line 255.
Use of uninitialized value in multiplication (*) at ./check_httpd_limits.pl line 261.
Use of uninitialized value in concatenation (.) or string at ./check_httpd_limits.pl line 306.
OK: Maximum HTTP procs (ServerLimit : 3 MB) fits within the available RAM (ProjectFree 1961 MB).
|
In the script and the help usage there are some trouble about -e or -c as parameter
Would be nice if that script would work with event mpm, too. |
|
Back to top |
|
jsmoriss
Joined: 11 Nov 2012 Posts: 8 Location: Montreal QC, Canada
|
Posted: Mon 12 Nov '12 1:57 Post subject: |
|
|
Thanks for letting me know - yeah small, mix-up there about the -c and -e. I changed it to -e since the parameter is used internally to compare with /proc/*/exe files.
I added some additional debugging messages, so the -d parameter should be even more useful to track down the problem. Using -v might also provide more information on the various values the script is picking up too.
Hopefully we can get this ironed out quickly for you.
BTW, I zippped up the current version and put it in the download area: http://code.google.com/p/check-httpd-limits/downloads/list
Thanks,
js. |
|
Back to top |
|
jsmoriss
Joined: 11 Nov 2012 Posts: 8 Location: Montreal QC, Canada
|
Posted: Wed 14 Nov '12 0:52 Post subject: |
|
|
FYI - Following your post, I had a chance to work on the script a bit more and made quite a few changes... The command-line options have changed, it uses SQLite (only if) you use the --save/days/maxavg options, and I've written some documentation on the Google Code wiki section. ;-)
http://code.google.com/p/check-httpd-limits/wiki/Documentation
Let me know what you think.
Thanks,
js. |
|
Back to top |
|
Millennium
Joined: 17 Apr 2006 Posts: 179 Location: Leiderdorp, NL, EU
|
Posted: Wed 14 Nov '12 10:27 Post subject: Re: Check Apache httpd prefork or worker limits... |
|
|
Seems intresting, but how to work it on Win32? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
jsmoriss
Joined: 11 Nov 2012 Posts: 8 Location: Montreal QC, Canada
|
Posted: Thu 15 Nov '12 18:12 Post subject: |
|
|
James,
Thanks for the contribution. I made additional changes to incorporate the differences between 2.2 and 2.4. The link you provided to the 2.4 defaults are those from the 2.4 config, not the 2.4 defaults compiled into the binary. I'm predefining values in case the option is missing from the config file, so the binary defaults are more appropriate.
I've been able to test the script on a variety of prefork servers up to v2.2, but I don't have any v2.4 or worker/event servers. Let me know how it works out for you.
Thanks,
js. |
|
Back to top |
|
jsmoriss
Joined: 11 Nov 2012 Posts: 8 Location: Montreal QC, Canada
|
Posted: Thu 15 Nov '12 18:17 Post subject: Re: Check Apache httpd prefork or worker limits... |
|
|
Millennium wrote: |
Seems intresting, but how to work it on Win32? |
The script uses files under /proc, like /proc/meminfo, /proc/*/stat, etc., which (as far as I know) are only available in Linux.
Aside from that, the rest of the script should be compatible - perhaps with a few minor tweeks here and there - but an alternative to /proc for Windows would have to be found.
Thanks,
js. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
jsmoriss
Joined: 11 Nov 2012 Posts: 8 Location: Montreal QC, Canada
|
Posted: Thu 15 Nov '12 19:00 Post subject: |
|
|
Lol! Ok, thanks -- I just checked-in a minor revision in the trunk. Could you have a look and let me know if that fixes your problem?
Thanks!
js. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 15 Nov '12 19:14 Post subject: |
|
|
I'm a bit confused about the Possible Changes part. Since it does not show / reflect the values that I use. The rest works fine.
my config
Quote: |
<IfModule mpm_event_module>
StartServers 3
MaxClients 320
MinSpareThreads 40
MaxSpareThreads 120
ThreadsPerChild 20
MaxConnectionsPerChild 0
</IfModule>
|
Quote: |
Possible Changes
<IfModule mpm_event_module>
MaxConnectionsPerChild 0 # (no change) Default is 0
MaxRequestWorkers 5623 # (400 -> 5623) ServerLimit * ThreadsPerChild
MaxSpareThreads 250 # (no change) Default is 250
MinSpareThreads 75 # (no change) Default is 75
ServerLimit 225 # (16 -> 225) (MemFree + Cached + HttpdRealTot + HttpdSharedAvg) / HttpdRealAvg
StartServers 3 # (no change) Default is 3
ThreadsPerChild 25 # (no change) Default is 25
</IfModule>
|
|
|
Back to top |
|
jsmoriss
Joined: 11 Nov 2012 Posts: 8 Location: Montreal QC, Canada
|
Posted: Thu 15 Nov '12 19:36 Post subject: |
|
|
James Blond wrote: | I'm a bit confused about the Possible Changes part. Since it does not show / reflect the values that I use. The rest works fine.
|
Ah, yes, how about this then? :)
Code: |
Config for 100% of MemTotal
<IfModule prefork.c>
MaxClients 29 # (40 -> 29) (MemFree + Cached + HttpdRealTot + HttpdSharedAvg) / HttpdRealAvg
MaxRequestsPerChild 3000 # (no change) Default is 10000
MaxSpareServers 10 # (no change) Default is 10
MinSpareServers 5 # (no change) Default is 5
ServerLimit 29 # (40 -> 29) MaxClients
StartServers 5 # (no change) Default is 5
</IfModule>
|
And yeah, my web server needs more RAM. ;-)
Worker or Event would be nice, but I'm using PHP - which adds a whole new set of issues. :-p
Thanks,
js. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 16 Nov '12 10:32 Post subject: |
|
|
jsmoriss wrote: |
Ah, yes, how about this then?
|
That is very nice!
jsmoriss wrote: |
Worker or Event would be nice, but I'm using PHP - which adds a whole new set of issues. :-p
|
That is why I use PHP over mod_fcgid (Windows and Linux). I made a small how to apache 2.4 with mod_fcgid on debian for it. I never want to use prefork again on my own servers. |
|
Back to top |
|