[Melbourne-pm] Detecting Hardware limits / problems

Stas Bekman stas at stason.org
Thu Jan 27 16:34:08 PST 2005


David Dick wrote:
> One of my earliest perl experiences was being put in charge of a crusty 
> horrific set of cgi scripts that powered a fairly popular web site 
> (around 1-2 hits per second on average).  Popularity was building thou,
> and soon after i was put in charge, things would just go beserk.  The 
> error logs would suddenly fill with completely confusing error messages 
> about how the code base wasn't compiling, .pl files were not being 
> required successfully, etc.  I guessed in the end that the machine had 
> run out of memory because it had spawned too many cgi-scripts and set 
> about repairing things.
> 
> however, the mental scarring is still there and the question is, are 
> there are special tricks that people use to
> 
> 1) detect a hardware limit or problem and write a message to stderr?
> 2) stop a hardware limit or problem from filling stderr with tons of 
> verbose, misleading messages about the effects of the problem, instead 
> of the cause?
> 
> The point of this would be to as quickly as possible, alert the owner of 
> the program that hardware failure or a hardware limit has occurred.

David, take a look at BSD::Resource and ulimit(1). And you can try 
mod_perl+Apache::PerlRun, you will need a way fewer perls around (in which 
case Apache::Resource should be used to set hardware limits.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas at stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


More information about the Melbourne-pm mailing list