[Zope] Database adapter connections
Michal Bukovjan
bukovjan@mbox.dkm.cz
Fri, 15 Mar 2002 08:27:03 +0100
This is a cryptographically signed message in MIME format.
--------------ms010806090304000600020902
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Dieter Maurer wrote:
>Michal Bukovjan writes:
> > I have a database adapter, Level3 (inheriting from Shared.DC.ZRDB.TM).
> > All documentation I have found claims that such an adapter should be
> > able to open multiple connections to the database, I see always one though.
>You do not tell us, what database you are using.
>
>When, e.g., your Python DB API module is not multi-thread aware,
>then the Global Interpreter Lock is not released and only
>a single thread can run at a time.
>
>This is, e.g., a problem for ZODBCDA.
>
>
>Dieter
>
I was talking about my own hacked version of Interbase DA, that is
gvibDA / gvib Python API module (also changed/hacked by me).
I am experimenting with this, resolving some threading issues, and try
to get more performance.
I found that, for instance, Zope never looks at threadsafety variable
defined by the API variable.
The API actually releases the Global Interpreter lock during longer
lasting operations like fetch or execute (if we are talking about
Py_THREADS_ALLOW_BEGIN / END combos), but at any case, there is always
only one physical connection (I can tell it by number of active DB
server connections), which is being used by multiple Zope threads.
A second connection is never started, no matter how I changed the gvibDA
/ gvib so far.
Michal
--------------ms010806090304000600020902
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJUDCC
AwYwggJvoAMCAQICAwbf7jANBgkqhkiG9w0BAQQFADCBkjELMAkGA1UEBhMCWkExFTATBgNV
BAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMQ8wDQYDVQQKEwZUaGF3dGUx
HTAbBgNVBAsTFENlcnRpZmljYXRlIFNlcnZpY2VzMSgwJgYDVQQDEx9QZXJzb25hbCBGcmVl
bWFpbCBSU0EgMjAwMC44LjMwMB4XDTAyMD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