|
Nils Grimsmo
nilsgri at idi.ntnu.no
Mon Oct 27 22:48:46 EST 2003
On Mon, Oct 27, 2003 at 01:24:19PM -0800, Conrad Steenberg wrote:
> Somebody probably already answered your question, but just in case:
> You should use mod_python 3.x with apache 2.x.
>
> On Mon, 2003-10-27 at 05:56, Nils Grimsmo wrote:
> > i am running apache2 worker 2.0.47, mod_python 2.7.8 and python 2.3.2,
> > and have some stability problems.
sorry. got that wrong. looked at the package for apache1. use mod_python
3.0.3. i have now tried it for both python 2.2.3 and 2.3.2, with the
same old results.
> > i have made a simple web-page that uses mod_python.publisher. in
> > apache2.conf:
> >
> > AddHandler python-program .py
> > PythonHandler mod_python.publisher
> > PythonDebug On
> >
> > when i'm reloading the page, it seams random whether it will load
> > properly or crash with
> >
> > "Not Found
> >
> > The requested URL /~nilsgri/test.py was not found on this server."
> >
> > i would guess it has something to do with caching, as when i restart
> > apache2, sometimes the it works every other or so time i reload the
> > page, and sometimes it works every time, and sometimes never.
> >
> >
> > i have tried to track down where these errors occur, and have found that
> > exeptions are thrown at the following locations:
> >
> > mod_python.publisher:
> > resolve_object()
> > the line "obj = getattr(obj, obj_str)" throws AttributeError
> > sometimes.
> >
> > in this case:
> > module_name=test,
> > config={'PythonDebug': '1'},
> > path=['/home/nilsgri/public_html']
> > which seems right
> >
> > mod_python.publisher:
> > import_module()
> > "if (not file or path and not
> > filter(lambda a: os.path.dirname(file).find(a) == 0,
> > path)):" hits sometimes
> >
> > what could be wrong?
> >
> > is there any way of turning off caching of python modules?
> >
> >
> > i use the apache2 worker thread module, and i have also tried prefork. i
> > have not tried perchild or threadpool. should i?
> >
> >
> > klem fra nils
> --
> Conrad Steenberg <conrad at hep.caltech.edu>
>
--
nils grimsmo <nilsgri at idi.ntnu.no>
"why is this thus? what is the reason of this thusness"
- artemus ward
|