Re: handling multiple threads

Skip Montanaro <[email protected]> Thu, 20 Jun 2013 20:14:38 -0500
Newsgroups gmane.comp.python.sybase
Message-ID <CANc-5UzSUXGMPHDFTjam9ETncnktE2pw29WM_xTTucEYu-oybw@mail.gmail.com>
On Thu, Jun 20, 2013 at 4:59 PM, Kevin Stone <[email protected]> wrote:
> The problem is not that queries take a long time. The problem is that queries are not being executed in parallel. All it takes is for one user to run a query (it does not have to be a long one, maybe a few seconds), and the entire app will be down until that query finishes.
>
> I am using python 2.7 on linux with freeTDS against sybase 15.

Rob and I discussed this a little bit off-line (we happen to work at
the same Sybase-using company).  A quick glance last night suggested
to me that the python-sybase code does its own GIL releasing and
acquiring, not relying on the macros Python provides for this purpose.
 It's possible that over time the GIL-handling code in Python has
changed, and the code in python-sybase hasn't kept up.

Just to be confirm though, your other threads are threads are not even
into the Sybase part of the system, correct?  They aren't blocking
because the first query has locked resources in the server?

I'll try to take a look more closely at GIL-handling code tomorrow.

Skip

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev