Re: [Cppcms-users] How to prevent server goes down when crash?
Brought to you by:
artyom-beilis
From: 李明 <lim...@gm...> - 2011-08-22 01:27:18
|
I didn't work on posix platform. I use microsoft vs to build it and use apache in windows to run it. This is what I did: 1. Added a (*(char *) 0) = 0 in the hello:main() function. This should make process crash when user try to access the URL. 2. Configure hello.exe run as fastcgi mode and start the it as hello.exe -c config.js 3. Configure apache to run hello.exe independently( http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_tut_web_server_config#Apache..FastCGI..Independent.start ) 4. Try to access http://localhost:8080/hello Obviously hello.exe crash and exit. Maybe I ran it as wrong way but I don't fully understand how to run it as multi-thread. On Sat, Aug 20, 2011 at 6:18 PM, Artyom Beilis <art...@ya...> wrote: > >Subject: [Cppcms-users] How to prevent server goes down when crash? > > > > > > >I used Apache to configure an external application server with fastcgi > mode in Windows. > > > > > > Fastcgi is process isolation, so I try to make my > > application based on cppcms crash to see how will happen > > to server, but it went down when crash happen. How to prevent > > this happen? Do I need to do some configuration to enable multi thread? > > > > > > To be honest I don't understand the question? How crash of cppcms programs > crashes the web server? CppCMS runs different process, maximum > you should get 500 HTTP Error. > > Another thing, on POSIX platforms you can set "service.worker_processes" > to 1 and it would allow CppCMS to control its own lifetime and restart > the process when it goes down automatically. > > > http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_config#service.worker_processes > > Artyom > > > > > > > > > > > > > >Thanks. > > >------------------------------------------------------------------------------ > >Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > >user administration capabilities and model configuration. Take > >the hassle out of deploying and managing Subversion and the > >tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > >_______________________________________________ > >Cppcms-users mailing list > >Cpp...@li... > >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |