in reply to Memory, Apache::SizeLimit, BSD::Resource::getrusage(), and the long road
Very interesting read, tye, and if you search the modperl list archives, you'll see that the question of how to read real memory usage has long lacked a satisfactory answer.
You may take a look at Stas Bekman's article on Calculating Real Memory Usage, which tries hard to give an answer (via GTop) which is good enough, if not completely accurate, or fast.
Though now I've got to learn the proper way to tell an Apache child to exit cleanly after finishing this request
You can do this by calling $r->child_terminate(), which will cause the child to exit cleanly after finishing the request. If you were to implement this as an external watchdog, (and I'm not sure how signal handlers would work if the child is not running Perl code at the moment you send the signal), you could just add a process at the end of each request (or every N requests) which would check for a file apache/exit/$PID and call $r->child_terminate() at that point.
Clint
|
|---|