[mod_python] server shutdown [was] i beg...

Norman Tindall NormanTindall at zdisk.net
Fri Aug 18 14:26:21 EDT 2006


Hello,

DF> So you are saying:
DF> 1) There is a mechanism for cleaning up code
DF> 2) This mechanism is not reliable
DF> 3) Since databases have to assume clients are not reliable, they clean 
DF> up for them anyway
DF> 4) Therefore we should not even try to clean up

DF> I'm with you on points 1, 2, and 3, but I think point 4 is taking it a 
DF> bit too far...
DF> Surely there must be *some* value in trying to clean up behind yourself, 
DF> sometimes?
    I am not sure if i understand right,
    but as i see the problem is to close connection or to
    return it to pool.

    Don`t know how about publisher and PSP, but in handler
    you always can at the end of processing, just before
    return apache.OK close connection , more better thing is to
    use 'try finnaly' and process all the stuff you need
    (selects,insert,..) in 'try' while conn.close() (or return to pool)
    if 'finnaly'.

    As i know 'finnaly' happens before 'return' statement even if
    'return' in 'try'.

    I think the same can be easily done with Publisher and PSP.

    Am i right Graham?



-- 
Best regards,
 Norman                            mailto:NormanTindall at zdisk.net



More information about the Mod_python mailing list