Re: Is Django Threaded Fastcgi Safe?

2007-11-06 Thread Joe

Great answer, thank you!

On Nov 5, 5:17 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> The latest roundup on thread safety of Django is that although it was
> not designed for thread safety initially, the only known
> multithreading problem has been fixed some time back. As such,
> numerous people do run it in Apache worker MPM for UNIX and on winnt
> MPM on Windows, both of which are multithreaded. The Django
> instructions even show using multithreaded mode with FASTCGI, so that
> it is present must mean people are having success with it also.
>
> The important thing though is whether your own application code built
> on top of Django is itself thread. You would therefore need to ensure
> you test you code properly.
>
> Using mod_wsgi is another option and perhaps simpler to configure and
> manage than FASTCGI solutions, especially if the later requires a
> separate supervisor system to startup your FASTCGI processes and keep
> them running. Using mod_wsgi you also have the option of easily
> changing your mind and moving an application back into the main Apache
> child processes (like in mod_python) if performance is more important
> for a specific application than memory consumption.
>
> Graham
>
> On Nov 6, 6:11 am, Joe <[EMAIL PROTECTED]> wrote:
>
> > Also, should I take a look at mod_wsgi?
>
> > On Nov 5, 11:22 am, Joe <[EMAIL PROTECTED]> wrote:
>
> > > I am considering switching from mod_python and apache to lighttpd and
> > > fastcgi because of the large number of virtual hosts I am serving.
>
> > > Because each virtual host gets its own sub interpreter, each apache
> > > instance on my server can weigh in at over 160 megs.
>
> > > I have heard that apache-mpm, mod_python and Django will not work, so
> > > I would like to know if using fastcgi with method=threaded would be a
> > > good way to solve my memory usage problems.
>
> > > When I start one fastcgi process in threaded mode, it only uses 8 megs
> > > of memory, which is a lot more scalable than apache instances weighing
> > > in at 160 megs.
>
> > > Thoughts, please.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Is Django Threaded Fastcgi Safe?

2007-11-05 Thread Graham Dumpleton

The latest roundup on thread safety of Django is that although it was
not designed for thread safety initially, the only known
multithreading problem has been fixed some time back. As such,
numerous people do run it in Apache worker MPM for UNIX and on winnt
MPM on Windows, both of which are multithreaded. The Django
instructions even show using multithreaded mode with FASTCGI, so that
it is present must mean people are having success with it also.

The important thing though is whether your own application code built
on top of Django is itself thread. You would therefore need to ensure
you test you code properly.

Using mod_wsgi is another option and perhaps simpler to configure and
manage than FASTCGI solutions, especially if the later requires a
separate supervisor system to startup your FASTCGI processes and keep
them running. Using mod_wsgi you also have the option of easily
changing your mind and moving an application back into the main Apache
child processes (like in mod_python) if performance is more important
for a specific application than memory consumption.

Graham

On Nov 6, 6:11 am, Joe <[EMAIL PROTECTED]> wrote:
> Also, should I take a look at mod_wsgi?
>
> On Nov 5, 11:22 am, Joe <[EMAIL PROTECTED]> wrote:
>
> > I am considering switching from mod_python and apache to lighttpd and
> > fastcgi because of the large number of virtual hosts I am serving.
>
> > Because each virtual host gets its own sub interpreter, each apache
> > instance on my server can weigh in at over 160 megs.
>
> > I have heard that apache-mpm, mod_python and Django will not work, so
> > I would like to know if using fastcgi with method=threaded would be a
> > good way to solve my memory usage problems.
>
> > When I start one fastcgi process in threaded mode, it only uses 8 megs
> > of memory, which is a lot more scalable than apache instances weighing
> > in at 160 megs.
>
> > Thoughts, please.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Is Django Threaded Fastcgi Safe?

2007-11-05 Thread Joe

Also, should I take a look at mod_wsgi?

On Nov 5, 11:22 am, Joe <[EMAIL PROTECTED]> wrote:
> I am considering switching from mod_python and apache to lighttpd and
> fastcgi because of the large number of virtual hosts I am serving.
>
> Because each virtual host gets its own sub interpreter, each apache
> instance on my server can weigh in at over 160 megs.
>
> I have heard that apache-mpm, mod_python and Django will not work, so
> I would like to know if using fastcgi with method=threaded would be a
> good way to solve my memory usage problems.
>
> When I start one fastcgi process in threaded mode, it only uses 8 megs
> of memory, which is a lot more scalable than apache instances weighing
> in at 160 megs.
>
> Thoughts, please.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Is Django Threaded Fastcgi Safe?

2007-11-05 Thread Joe

I am considering switching from mod_python and apache to lighttpd and
fastcgi because of the large number of virtual hosts I am serving.

Because each virtual host gets its own sub interpreter, each apache
instance on my server can weigh in at over 160 megs.

I have heard that apache-mpm, mod_python and Django will not work, so
I would like to know if using fastcgi with method=threaded would be a
good way to solve my memory usage problems.

When I start one fastcgi process in threaded mode, it only uses 8 megs
of memory, which is a lot more scalable than apache instances weighing
in at 160 megs.

Thoughts, please.


--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---