tags:

views:

314

answers:

1

Hi, I'm using FastCGI to expose a C++ binary (written using the Wt framework) as a web app. However, after I have modified the app and recompiled it, in order for new sessions to see the changes (active sessions keep using the old version until they expire), I have to reload Apache.

Is it possible to configure the system in such a way that doesn't require to reload Apache in order to make the newly compiled FastCGI app available to users? Thanks.

+1  A: 

Quote from the FAQ:

Applications started by mod_fastcgi can use the autoUpdate argument to FastCgiServer and/or FastCgiConfig (see the mod_fastcgi docs). A drawback to this approach is that, mod_fastcgi will check on every request for a new version of the application. A smarter implementation might have the application itself check periodically (either by number of requests handled or by time passed) and reload if a newer version of itself (or one of its libraries) exists. If a process manager, such as that embedded in mod_fastcgi, is responsible for the process, simply exiting will cause a new instance to be created.

So, you either enable automatic update in the configuration, or your program does the reloading itself by some mechanism you like best.

HS