Perrin Harkins wrote: > Stas Bekman wrote: > >> If you are talking about threaded mpms, we will need to develop new >> tools to restrict the size of the perl interpreters in the pool. > > > I was thinking about that too. Are there hooks for causing an > interpreter to exit? Is it safe to simply call CORE::exit? I'd like > to make SizeLimit work for the threaded MPMs if possible.
I think the idea was to have a special thread running whose only purpose is monitoring the pool of idle interpreters. Inside that thread you could have various processes happening for each process: - garbage collection (walk the optree and free big chunks of reserved/unused memory, other optimizations) - destroy interpreters that have too much non-shared memory, etc - reload modified modules? - etc.. I think this was somewhat discussed about a year ago. I'm not sure if this approach can be somehow piggy-backed into Apache::SizeLimit so users will be able to run pretty much the same setup for threaded and non-threaded mpms. I believe that we can add a Perl space hook that sets a flag that condemns an interpreter to death. When an interpreter is put back into the pool, this flag can be checked and modperl_interp_cleanup() called if that flag is set, thus killing the interpreter. I'm not sure if CORE::exit will work, most likely not, because it'll probably unsync the pool state. Need to try though. __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
