[mod_python] Lock-Problem with Oracle

Bart scarfboy at gmail.com
Fri Mar 14 15:12:00 EDT 2008

On Fri, Mar 14, 2008 at 2:16 PM, Hartmut Fröls <h.froels at web.de> wrote:
>  The http-page has some AJAX-functions, which send and recieve
>  the datas the user needs or has updatet.
>  The problem is, when the programm makes the update on the
>  database, it waits for the lock, because the programm has opend
>  a second cursor for the update, although the cursor-objects should
>  be global. I know, after reading many of the postings in this group and all over
(I assume you mean the library reference, which is probably threadpooling.
Globally sharing cursor (not even connection) objects sounds like trouble)

>  the web, that this is because mod_python opens a new request for
>  the call of the PutDat() function and this new interpreter-instance of
>  this request has its own global vars.
Long-lived subinterpreters which handle many requests in their lifetime,
of which there are generally a bunch, and the issue being that you
may or may not land in the same one based on uncontrollable factors,
but close enough.

>  So I come to my question: is there any way to tell mod_python, that the
>  AJAX-request from the http-page must go to the interpreter-instance,
>  that has generatet the page ?
Basically, no.

>  Or do You know any other solution for this lock-problem ?
Frankly, I don't understand your explanation, so I don't get the
problem to be solved.
Database table locking is usually both unavoidable, and almost short for simple
updates, and (particularly if your database library threadpools) I
don't really see
how this is related to client-side code, so I can't think of what type
of locking
problem you are describing.

If the other response didn't help you, please give more detail, such as a
diagnosis on what process is waiting on what other process, why it would,
exactly how this is a problem, and why you want the next request to be
handled by the same interpreter (and not anything *but* that interpreter,
which is what I figured you meant at first).


More information about the Mod_python mailing list