[mod_python] ModPython, Psycopg postgresql gives segmentation fault

java_dev java_dev at nilling.nl
Tue Nov 30 14:31:36 EST 2004


Today I try to reply on the answers I got, but I guess the ended up everywhere except on this list.

I read everything and thanks for the help. There are two action I have to take. That's check the python version and find the correct way to connect to the database since in any method I have I make a connection to the database. I know very bad, much faster then in Java, so no real reason to get upset right now.

The Database is working fine, but session stuff is still a problem. So I look tonight into the anyDBM pointer I recieved Rune.

I keep you posted,

Johan


On Tue, 30 Nov 2004 12:06:09 +0100
Martin Slouf <mar at centrum.cz> wrote:

> hi,
> 
> fisrt of all, sorry, not sure this is the right thread, by mistake i pressed
> Ctrl-D in mutt more than once :) and the net archives are somewhat unreachable.
> 
> i guess johan was sending me an email where he complained about segfaults when
> he tried to store db connection object in session.
> 
> im afraid mod_python is using cpickle, not pickle, to store session objects and
> though much faster, the db connection object cannot be saved in session --
> anyway, i just simulated a sample page trying to store the db connection in
> session and the errors i received where not segfaults, but some cpikle
> exception.
> 
> try to store the db connection in global variable.
> 
> m.
> 
> 
> On Tue, Nov 30, 2004 at 11:15:09AM +0100, Rune Hansen wrote:
> > 
> > On 29. nov 2004, at 21.56, java_dev wrote:
> > 
> > >
> > >If someone can give me a pointer how to prevent the Session from 
> > >creating segmentation Faults please let me know. And if there is 
> > >another way for preventing the authenicationhandler from being called 
> > >all the time please let me know
> > >
> > >Thanks
> > >
> > >Johan
> > >
> > As for the session segfault. Just remembered  had this problem on 
> > Fedora Core1 with python 2.3.3. On this machine a python interpreter in 
> > mod_python could not make use of the anydbm(dbhash) module. If the db 
> > type was given to : Session.DbmSession(req, dbm=gdmb) the segfault 
> > disappeared, but then register_cleanup would fail. I "solved" it by 
> > compiling python 2.3.4 on that machine.
> > 
> > regards
> > /rune
> > 
> > _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org
> > http://mailman.modpython.org/mailman/listinfo/mod_python
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python


-- 
Nilling Software Design
Postbus 43
2280 AA  Rijswijk ZH
w: http://www.nilling.nl


More information about the Mod_python mailing list