[mod_python] modpy3.2 + apache2.2 + odbc + dbisam - substitute tocgi ?

Graham Dumpleton grahamd at dscpl.com.au
Tue Jan 23 19:09:27 EST 2007

If not doing so already, force all your mod_python request handlers to run
within the context of the first Python interpreter instance created by
mod_python by using:

  PythonInterpeter main_interpreter

I think you need to have at least mod_python 3.2.10 for this to
be of any use because of bugs in earlier versions of mod_python.

This can be required where third party Python modules are not written
correctly so as to be usable from secondary interpreters. For more
details on what this issue is about, see:


That said, this may not help at all and is just a guess.


durumdara wrote ..
> Hi!
> My problem is that:
> I need to use DBISAM databases.
> There is no native Python driver for DBISAM, but DBISAM have ODBC driver.
> I build two sites with DBISAM local database, and with ODBC drived by 
> pywin32 odbc module.
> Everything is worked good (it seems to be) if I drop my cursors on every
> request.
> But now I needed to change ODBC to remote mode (to read remote database).
> Yesterday I simple changed the settings of the driver, and next I found
> me in the hell... :-(((
> In every 2.-3. request the httpd.exe is crashed. No error msg. generated
> (logs), only Windows create some dumps about it.
> In the event log I see that ntdll.dll and sometimes the odbc.pyd is the
> source of the error.
> Interesting thing, that my sites are working good with odbc.pyd and 
> DBISAM when they are not used remote databases.
> I tried everything: I set MaxReqPChild to 1 (to cleanup), close 
> cursors/databases on finishing of scripts, etc.
> When I try to do same thing with normal python interpreter, I cannot do
> it. I can open many-many connections, and they are cleaned up normally...
> Next I downloaded mxODBC, and tried it. It is working good, but it's 
> prices are not good for me.
> Today I download the pyodbc package, but it is possible not thread-safe.
> Or possible it is not working good later, I don't know.
> I have not experienced with this.
> So:
> I need some information to prepare to change if needed.
> There is two way to working with dbisam + odbc under apache.
> First: I need to write a database server (socketserver) that communicate
> beetween my apache processes and ODBC database. It is payful.
> Second: I need to change to cgi mode to avoid these problems.
> Please help me: what you offer me when I want to use cgi? The modpy 
> library can supports this working mode? Or what I need to do for it?
> Please offer me some library, and example to prepare if the problems 
> appearing!
> Thanks for your help:
>     dd
> _______________________________________________
> 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