[Speedycgi-users] Re: Possible ALARM bug report and a feature wish
Brought to you by:
samh
|
From: Sam H. <sa...@da...> - 2002-10-18 17:04:09
|
> 2. Feature wish: > In SpeedyCGI there is the add_shutdown_handler for post-processing when > the backend terminates and there is the register_cleanup for doing the > same after each request. However, in cases such as handling user > sessions in a CGI environment using the SpeedyCGI Group directive, an > unique process may process a couple of users, holding their ongoing > session data in memory. Other processes come in, even launched through > the same Web visitor (user reloading page or requesting next page within > short time, etc.), which is a problem in itself (a special global memory > space, shared between active Group processes via the backend would be > great indeed!) I think other CPAN modules address the shared session problem. It looks like CGI::Session is one. Maybe you could extend that moduule to use memory instead of files, though if you use a ramdisk (like tmpfs in solaris), it's about the same. > yet the shutdown_handler will not come into action when > a process terminates, only when the backend itself shuts down. No, the shutdown_handler is called before the unix process terminates. There is one unix process for each backend. > So my urging feature wish would be a "pid_ shutdown_handler" that in my > current case would post-process any "in-memory per process" session data > to disk. Would this be doable? Since shutdown_handler is already per process, it should already do this. |