[mod_python] ModPython, Psycopg postgresql gives segmentation fault

Justin Ryan jryan at qutang.net
Mon Nov 29 20:31:10 EST 2004


What exactly are you storing in the session?

Under what conditions do you avoid a database hit, specifically?

Is it necessary to avoid a database hit during authenhandler, since you 
are probably going to hit the db again later?  It would probably help 
to keep your code from creating a new db connection after 
authenticating, but it seems logical that you will need one at some 
point during most requests (unless you are using postgres only for 
authentication).

-=JR

On Nov 29, 2004, at 12:56 PM, java_dev wrote:

> Hi,
> Some config stuff is puzzeling me. I have a site running with 
> mod_python 3.1.3, apache 2.0.49, psycopg 1.99.10 and postgres 7.4.2
>
> On my developmentmachine the only real difference is that I'm using 
> postgresql 7.4.5
>
> I get a segmentation fault when using authentication using a database. 
> Strange because writing this email made me try switching the 
> authenhandler of to see if the rest was also crashing but that part is 
> working ok.
>
> So the Segmentation Fault is caused by the AuthenHandler using the 
> database.
>
> Further research showed that nothing is wrong with the database but I 
> have trouble with the Session part of the authentication.
>
> I store a uservalue in the Session which I check and on my 
> productionserver is gives a crash and on my development machine it 
> works well.
>
> The reason i store a value in the session is that the 
> AuthenticationHandler every request a call to the database makes. I 
> tried to prevent that behaviour.
>
> 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
>
>
> -- 
> Nilling Software Design
> Postbus 43
> 2280 AA  Rijswijk ZH
> w: http://www.nilling.nl
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list