Re: Multiple instances using mod_python

2008-09-25 Thread Graham Dumpleton

On Sep 25, 8:29 pm, "n00m" <[EMAIL PROTECTED]> wrote:
> what if to rename mod_python.so to mod_python_1.so and mod_python_2.so and 
> keep them both
> in apache's modules and run them as if they are different beasts.

You cannot do that. If you are wanting process separation then use
mod_wsgi daemon mode or fastcgi.

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



Re: Multiple instances using mod_python

2008-09-25 Thread n00m


what if to rename mod_python.so to mod_python_1.so and mod_python_2.so and keep 
them both 
in apache's modules and run them as if they are different beasts.


--~--~-~--~~~---~--~~
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: Multiple instances using mod_python

2008-09-24 Thread Graham Dumpleton

The problem is more fundamental than that and virtual environments
would not help. This is because it relates to which Python sub
interpreter instance is selected and not where modules may be imported
from for a specific sub interpreter instance.

Graham

On Sep 25, 5:12 am, "Álvaro J. Iradier" <[EMAIL PROTECTED]> wrote:
> Take a look at this, it worked for me:
>
> https://devel.airadier.com/default/blog/modpythonvirtualenvironments
>
> Greets.
>
>
>
> On Wed, Sep 24, 2008 at 4:52 PM, Scott Moonen <[EMAIL PROTECTED]> wrote:
> > I'm running a single instance of Apache to serve two IP addresses.  One IP
> > address has specific hostnames assigned in several VirtualHosts, and a
> > Location statement for certain hostnames to be handled by a mod_python
> > instance running a Django application.  The other IP address has a
> > wildcarded ServerAlias, and DNS is setup so that any hostname not
> > specifically assigned to the first IP address is directed to this second IP
> > address.  For this second IP address I have a VirtualHost that also uses a
> > mod_python instance running a different Django application.
>
> > I see on this thread
> > 
> > from last year that there is suspicion that Apache can at times misdirect
> > mod_python requests to the wrong mod_python instance.  And this is what I'm
> > experiencing from time to time.  It's a bit strange, though: 1) normal file
> > content on these same virtual hosts outside of my mod_python 
> > statement seems to load fine, so Apache seems to be confused only when
> > directing requests to mod_python; 2) this is intermittent, as several
> > requests in a row may go to the wrong handler while a subsequent request may
> > go to the proper handler; 3) I have taken care to force a specific ordering
> > in my virtual host definitions, but this has not helped, although I kind of
> > expected that given that the problem is intermittent; and 4) the wildcarded
> > virtual host is in fact the only virtual host on my second IP address, and I
> > have no other VirtualHosts for that IP address, so the fact that Apache
> > seems to be misdirecting the mod_python handler to virtual hosts for an
> > entirely different IP address is pretty disconcerting.
>
> > I'm running Apache 2.2.3, mod_python 3.3.1, and the latest Django SVN.
> > Because filesystem content loads fine, and because this problem is polluting
> > VirtualHosts that don't even share the same IP address, it seems intuitive
> > that the problem must be some weakness in Apache's internal scoping of
> > Location statements to the VirtualHosts that they appear in.
>
> > Is anyone else experiencing this problem?  Is anyone aware of any fixes?
> > Based on my guess that the problem is Apache's internal scoping of Location
> > directives, I'm tempted to switch from mod_python to mod_fastcgi.  But I'd
> > rather stick with the recommended mod_python deployment method if there's a
> > known way of getting things working,
>
> >   -- Scott
>
> > --
> >http://scott.andstuff.org/|http://truthadorned.org/
>
> --
> (:===:)
>  Alvaro J. Iradier Muro - [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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: Multiple instances using mod_python

2008-09-24 Thread Graham Dumpleton



On Sep 25, 12:52 am, "Scott Moonen" <[EMAIL PROTECTED]> wrote:
> I'm running a single instance of Apache to serve two IP addresses.  One IP
> address has specific hostnames assigned in several VirtualHosts, and a
> Location statement for certain hostnames to be handled by a mod_python
> instance running a Django application.  The other IP address has a
> wildcarded ServerAlias, and DNS is setup so that any hostname not
> specifically assigned to the first IP address is directed to this second IP
> address.  For this second IP address I have a VirtualHost that also uses a
> mod_python instance running a different Django application.
>
> I see on this thread 
> 
> from last year that there is suspicion that Apache can at times misdirect
> mod_python requests to the wrong mod_python instance.  And this is what I'm
> experiencing from time to time.  It's a bit strange, though: 1) normal file
> content on these same virtual hosts outside of my mod_python 
> statement seems to load fine, so Apache seems to be confused only when
> directing requests to mod_python; 2) this is intermittent, as several
> requests in a row may go to the wrong handler while a subsequent request may
> go to the proper handler; 3) I have taken care to force a specific ordering
> in my virtual host definitions, but this has not helped, although I kind of
> expected that given that the problem is intermittent; and 4) the wildcarded
> virtual host is in fact the only virtual host on my second IP address, and I
> have no other VirtualHosts for that IP address, so the fact that Apache
> seems to be misdirecting the mod_python handler to virtual hosts for an
> entirely different IP address is pretty disconcerting.
>
> I'm running Apache 2.2.3, mod_python 3.3.1, and the latest Django SVN.
> Because filesystem content loads fine, and because this problem is polluting
> VirtualHosts that don't even share the same IP address, it seems intuitive
> that the problem must be some weakness in Apache's internal scoping of
> Location statements to the VirtualHosts that they appear in.
>
> Is anyone else experiencing this problem?  Is anyone aware of any fixes?
> Based on my guess that the problem is Apache's internal scoping of Location
> directives, I'm tempted to switch from mod_python to mod_fastcgi.  But I'd
> rather stick with the recommended mod_python deployment method if there's a
> known way of getting things working,

The one time where a concrete reason was found for this occurring for
a specific person, it was found to be the lack of the NameVirtualHost
directive in Apache configuration. Other than that, yes there is some
suspicion of wildcarding in ServerAlias causing a problem for
mod_python in some instances.

The same problem hasn't been seen with mod_wsgi at this point. So, if
stuck try it as someone else suggested.

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



Re: Multiple instances using mod_python

2008-09-24 Thread Álvaro J. Iradier

Take a look at this, it worked for me:

https://devel.airadier.com/default/blog/modpythonvirtualenvironments

Greets.

On Wed, Sep 24, 2008 at 4:52 PM, Scott Moonen <[EMAIL PROTECTED]> wrote:
> I'm running a single instance of Apache to serve two IP addresses.  One IP
> address has specific hostnames assigned in several VirtualHosts, and a
> Location statement for certain hostnames to be handled by a mod_python
> instance running a Django application.  The other IP address has a
> wildcarded ServerAlias, and DNS is setup so that any hostname not
> specifically assigned to the first IP address is directed to this second IP
> address.  For this second IP address I have a VirtualHost that also uses a
> mod_python instance running a different Django application.
>
> I see on this thread
> 
> from last year that there is suspicion that Apache can at times misdirect
> mod_python requests to the wrong mod_python instance.  And this is what I'm
> experiencing from time to time.  It's a bit strange, though: 1) normal file
> content on these same virtual hosts outside of my mod_python 
> statement seems to load fine, so Apache seems to be confused only when
> directing requests to mod_python; 2) this is intermittent, as several
> requests in a row may go to the wrong handler while a subsequent request may
> go to the proper handler; 3) I have taken care to force a specific ordering
> in my virtual host definitions, but this has not helped, although I kind of
> expected that given that the problem is intermittent; and 4) the wildcarded
> virtual host is in fact the only virtual host on my second IP address, and I
> have no other VirtualHosts for that IP address, so the fact that Apache
> seems to be misdirecting the mod_python handler to virtual hosts for an
> entirely different IP address is pretty disconcerting.
>
> I'm running Apache 2.2.3, mod_python 3.3.1, and the latest Django SVN.
> Because filesystem content loads fine, and because this problem is polluting
> VirtualHosts that don't even share the same IP address, it seems intuitive
> that the problem must be some weakness in Apache's internal scoping of
> Location statements to the VirtualHosts that they appear in.
>
> Is anyone else experiencing this problem?  Is anyone aware of any fixes?
> Based on my guess that the problem is Apache's internal scoping of Location
> directives, I'm tempted to switch from mod_python to mod_fastcgi.  But I'd
> rather stick with the recommended mod_python deployment method if there's a
> known way of getting things working,
>
>   -- Scott
>
> --
> http://scott.andstuff.org/ | http://truthadorned.org/
>
> >
>



-- 
(:===:)
 Alvaro J. Iradier Muro - [EMAIL PROTECTED]

--~--~-~--~~~---~--~~
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: Multiple instances using mod_python

2008-09-24 Thread Scott Moonen
FYI because there was some wildcarding going on, I think my ServerNames were
actually duplicate in the two VirtualHost definitions (unqualified main
domain name) and I was accomplishing any differentiation using ServerAlias.
According to the mod_python docs <
http://www.modpython.org/live/current/doc-html/pyapi-interps.html>, this
must have caused my instances to share an interpreter, probably resulting in
some unfortunate collisions on key modules (like the settings file, which
had the same path in both handlers).  So I added the PythonInterpreter
directive as suggested by mod_python and as indicated in the Django docs <
http://docs.djangoproject.com/en/dev/howto/deployment/modpython/>.  Haven't
had much opportunity to test, but I expect this will do the trick.

Just wanted to close the loop here on the list in case someone stumbles
across this in the future,

  -- Scott

On Wed, Sep 24, 2008 at 12:11 PM, David Durham, Jr. <
[EMAIL PROTECTED]> wrote:

>
> > I see on this thread
> > <
> http://groups.google.com/group/django-users/browse_thread/thread/4f0cb183eb5b43cd/7be0fa3681b73220?lnk=raot
> >
> > from last year that there is suspicion that Apache can at times misdirect
> > mod_python requests to the wrong mod_python instance.
>
> You could try mod_wsgi.
>
> -Dave
>
> >
>


-- 
http://scott.andstuff.org/ | http://truthadorned.org/

--~--~-~--~~~---~--~~
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: Multiple instances using mod_python

2008-09-24 Thread David Durham, Jr.

> I see on this thread
> 
> from last year that there is suspicion that Apache can at times misdirect
> mod_python requests to the wrong mod_python instance.

You could try mod_wsgi.

-Dave

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---