The version of Apache::SizeLimit in subversion is quite different from
the currently released version. Attached is this patch, but reworked to
apply to the version in SVN.
If there are no objections, I will commit this, it seems like a pretty
straight forward change.
Adam
Max Kanat-Alexander wrote:
All of my processes kept exiting with a report that they had a 300M
unshared size, which was clearly untrue, even from looking at top. After
some investigation, I discovered that Apache2::SizeLimit was calling
$s->size on the Linux::Smaps object, when instead it should be returning
$s->rss as the process size.
Attached is a one-line patch to fix the issue.
Also, if you're interested in proof that this is right, I've attached a
short .cgi file that you can load under mod_perl, with Linux::Smaps
installed, to see process sizes and the return values of all of the
Smaps accessors.
-Max
Index: lib/Apache/SizeLimit/Core.pm
===================================================================
--- lib/Apache/SizeLimit/Core.pm (revision 905815)
+++ lib/Apache/SizeLimit/Core.pm (working copy)
@@ -175,7 +175,7 @@
return $class->_linux_size_check() unless $USE_SMAPS;
my $s = Linux::Smaps->new($$)->all;
- return ($s->size, $s->shared_clean + $s->shared_dirty);
+ return ($s->rss, $s->shared_clean + $s->shared_dirty);
}
sub _linux_size_check {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@perl.apache.org
For additional commands, e-mail: dev-h...@perl.apache.org