As an aside, the Plack subsystem (often used with FastCGI) has support for this in an obscure parameter called "harakiri." Aptly-named but hard to spot the docs. It terminates the worker after a specified number of requests.
Re: Forcing modperl processes to restart after N requests
Replies are listed 'Best First'.