Multiple separate django sites at one webserver

9 views
Skip to first unread message

identify

unread,
Oct 9, 2007, 2:26:39 PM10/9/07
to Django users
I am about to have ~80 different django-driven sites running on my
server (each one needs a separate settings.py). Am I right that
manage.py runfcgi needs to be started for each site? If so - this
would lead to (let's say) 80*5 python processes running (when using
prefork) with each one consuming 15k memory. Is there another (better)
approach?

Best regards
Mario

Malcolm Tredinnick

unread,
Oct 9, 2007, 3:14:19 PM10/9/07
to django...@googlegroups.com

http://effbot.org/zone/django-multihost.htm

There's also a patch in Trac to allow this to work with reverse url
lookups as well, although I've personally been reluctant to apply it so
far, since I suspect there might be a better way to do it.

Regards,
Malcolm


identify

unread,
Oct 9, 2007, 3:50:05 PM10/9/07
to Django users
On 9 Okt., 21:14, Malcolm Tredinnick <malc...@pointy-stick.com> wrote:
> On Tue, 2007-10-09 at 11:26 -0700, identify wrote:
> > I am about to have ~80 different django-driven sites running on my
> > server (each one needs a separate settings.py). Am I right that
> > manage.py runfcgi needs to be started for each site? If so - this
> > would lead to (let's say) 80*5 python processes running (when using
> > prefork) with each one consuming 15k memory. Is there another (better)
> > approach?
>
> http://effbot.org/zone/django-multihost.htm

But this only seems to handle URL-Conf. I have patched my Django
Installation with the multi-db-patch and therefor I have different
database connection settings in my settings.py. Thatswhy I need
different settings.py-files

Malcolm Tredinnick

unread,
Oct 9, 2007, 4:11:58 PM10/9/07
to django...@googlegroups.com

You seem to have a contradiction in requirements, then. By definition,
fastcgi processes are long running and are only set up once. So they
will use the same settings files throughout, for example. Yet you
explicitly want different settings in each case.

If you really do need separate settings in each case, you are going to
have be running separate processes for each request.

Malcolm

Reply all
Reply to author
Forward
0 new messages