Re: mod_python - Using Apache prefork Vs Apache worker
Hi there Just to report on this, i set up a machine with very little memory using apache 2.2.1 (worker mpm), with mod_python 3.3 (development version 20060520) and django. It seems there is nothing much in django nor python that isn't thread safe. External C libraries you load as a python module might bring up issues. This installation is for development and never stands a high load. Worker mpm is setup to handle 20 threads in a single process, which causes all requests to be handled through the same resident python interpreter under normal load. Main problem here is that there isn't enough memory to keep both apache worker process and mysql instance resident. This results in swapping and delays, but no timeouts, crashes or coredumps seen. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: mod_python - Using Apache prefork Vs Apache worker
Graham Dumpleton wrote: > gabor wrote: >> Filipe wrote: >>> Hi, >>> >>> The docs say [1] that: >>> "Django requires Apache 2.x and mod_python 3.x, and you should use >>> Apache's prefork MPM, as opposed to the worker MPM." >>> >>> I want to test a Django site on a server (I plan to deploy there some >>> other sites in the future) where there are installed Apache 2 and >>> mod_python 3.1.4. >>> >>> I've seen some references [2][3] that make me suspect that the issues >>> that existed with mod_python and Apache worker might have been solved >>> in mod_python 3.2.8. >>> >>> What problems can I expect if I use mod_python 3.1.4? >>> Do you think the problems might have been fixed in 3.2.8? >>> >> well, generally, the "problem" with the worker MPM is that it's a >> multithreaded application. >> >> which means, that if you want to have your app in a worker MPM, it has >> to be thread-safe. and i don't know if django is thread-safe or not (i >> think it's not). >> >> also, when doing multithreaded python applications, the GIL (python's >> global interpreter lock) might become an issue. >> >> so, i'd recommend, that if you have enough memory, use the prefork MPM. > > If the inability to use worker MPM is because Django doesn't support > multithreading, then it would be impossible to use Django on Windows > as Apache there can only run with a multithreaded MPM, there is no > multi process option. > > Although I have asked previously why it is said that the worker MPM > shouldn't be used, no one has yet given a definitive answer. > > Also, saying the GIL might become an issue, this is no more than for > any other multithreaded application. One shouldn't be bringing the GIL > into this, as it has got nothing to do in practice with whether the > worker MPM can be used. > hmmm.. then it seems i misunderstood your question, sorry. if your question is more of an academic nature of "is it possible?", then for that i do not know the answer. it definitively is not the best way to run it, but maybe it is possible. gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: mod_python - Using Apache prefork Vs Apache worker
gabor wrote: > Filipe wrote: > > Hi, > > > > The docs say [1] that: > > "Django requires Apache 2.x and mod_python 3.x, and you should use > > Apache's prefork MPM, as opposed to the worker MPM." > > > > I want to test a Django site on a server (I plan to deploy there some > > other sites in the future) where there are installed Apache 2 and > > mod_python 3.1.4. > > > > I've seen some references [2][3] that make me suspect that the issues > > that existed with mod_python and Apache worker might have been solved > > in mod_python 3.2.8. > > > > What problems can I expect if I use mod_python 3.1.4? > > Do you think the problems might have been fixed in 3.2.8? > > > > well, generally, the "problem" with the worker MPM is that it's a > multithreaded application. > > which means, that if you want to have your app in a worker MPM, it has > to be thread-safe. and i don't know if django is thread-safe or not (i > think it's not). > > also, when doing multithreaded python applications, the GIL (python's > global interpreter lock) might become an issue. > > so, i'd recommend, that if you have enough memory, use the prefork MPM. If the inability to use worker MPM is because Django doesn't support multithreading, then it would be impossible to use Django on Windows as Apache there can only run with a multithreaded MPM, there is no multi process option. Although I have asked previously why it is said that the worker MPM shouldn't be used, no one has yet given a definitive answer. Also, saying the GIL might become an issue, this is no more than for any other multithreaded application. One shouldn't be bringing the GIL into this, as it has got nothing to do in practice with whether the worker MPM can be used. Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: mod_python - Using Apache prefork Vs Apache worker
Filipe wrote: > Hi, > > The docs say [1] that: > "Django requires Apache 2.x and mod_python 3.x, and you should use > Apache's prefork MPM, as opposed to the worker MPM." > > I want to test a Django site on a server (I plan to deploy there some > other sites in the future) where there are installed Apache 2 and > mod_python 3.1.4. > > I've seen some references [2][3] that make me suspect that the issues > that existed with mod_python and Apache worker might have been solved > in mod_python 3.2.8. > > What problems can I expect if I use mod_python 3.1.4? > Do you think the problems might have been fixed in 3.2.8? > well, generally, the "problem" with the worker MPM is that it's a multithreaded application. which means, that if you want to have your app in a worker MPM, it has to be thread-safe. and i don't know if django is thread-safe or not (i think it's not). also, when doing multithreaded python applications, the GIL (python's global interpreter lock) might become an issue. so, i'd recommend, that if you have enough memory, use the prefork MPM. gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---