From: Perrin H. <pe...@el...> - 2005-07-06 03:14:26
|
Antti M Vähäkotamäki wrote: > Then there is the bug of causing an infinite loop when Apache is stopped > probably because of undefined subroutine calls. There's something wrong with your mod_perl build or some module you are using. That isn't normal behavior, and it doesn't happen for me. > This on the other hand > causes a lot of swapping, setting swappiness doesn't cut it, and if I > turn of the swap, it sometimes causes my Linux to crash ;) None of that has ever happened for me when using mod_perl. > Then there is the problem (which is probably caused by the previous one) > that you can't start apache right after stopping it without producing a > failure, probably because some of the processes are still busy trying to > consume a lot of memory. Apache tries to do a graceful shutdown, meaning it tries to handle any connections that are currently operating. If you don't want it to do that, you can kill it more harshly with a -9/-KILL. Not a problem on a dev box where you are the only client. > And then there is the thing I _tried_ to describe ;) At least with the > above problems and the large codebase of OI2, stopping and starting > Apache takes a long time. You just have to stare at the prompt until it > gets done. Why do you have to stare at it? Are you sitting and waiting for the stop before you run start? I always do something like this on a dev machine: apachectl stop && apachectl start or use 'killall -KILL httpd' instead of apachectl stop. You can put that in a file and bind it to a key, just like you did with FastCGI. Since the code to be compiled and the setup to be created is identical with any of these server options, the total time for restarting should be the same. > By using FastCGI I can use the same apache to serve all the static > requests (which are usually plenty when reloading a normal page) That's true, your images would end up waiting if you used apache in -X mode. I don't think avoiding forking will make things start noticeably faster anyway. >> If it's just for dev though, the oi2_daemon server would probably work >> just as well. > > > That is true, but it also does initialization on startup (and forks, if > it matters ;-)). It might have also been a good choice to overcome the > problems, but FastCGI seems to be even slightly better because of the > initialization on request. They all load the same perl code, do the same initialization, etc. so the total restart time should be about the same. Some people (amazon.com, for example) prefer to use FastCGI over mod_perl, and that's fine. I'm just objecting to the idea that it's somehow faster at compiling the same code than mod_perl is. - Perrin |