And some drivers have a "timeout" parameter that handles this issue at the
vendor API level (e.g. DBD::Sybase's "timeout" parameter that is handled
internally by OpenClient).
Michael
Extranet
[EMAIL PROTECTED] - 19.09.2006 15:37
To: henri
cc: tyler, darnold, Tim.Bunce, dbi-users, dbi-dev
Subject: Re: Safely timing out DBI queries
I realize that this is very specific to the database, however, it may be
possible to set a resource limit at the database level that will prevent
the queries from consuming too much time.
Chuck
[EMAIL PROTECTED] wrote:
> On Sep 18, 2006, at 6:18 PM, Tyler MacDonald wrote:
>
>> Dean Arnold <[EMAIL PROTECTED]> wrote:
>>>>> Which brings me back to the notion of non-blocking requests.
>>>>> Assuming
>>>>> many/most client libs do support an async capability, and a OOB
>>>>> cancel, then it should be possible to standardize the behavior
>>>>> externally.
>>>>
>>>> Attempting to standardize, let alone implement, non-blocking requests
>>>> for the current DBI is a far bigger task than the above.
>>>>
>>>> On the other hand, I'd be *delighted* if you, or anyone else, would
>>>> like
>>>> to champion the work.
>>
>> <cheap hack>
>> Start up a thread to handle the request, which sets a state
>> variable on
>> the statement handle then the request has been processed?
>> </cheap hack>
>
> The problem is not to know when a request is done processing.
> The problem is killing requests that are processing for too long.
> If you want kill them safely, you may not be able to kill them until
> they're done, which defeats the purpose.
> If you kill them "unsafely", then the Perl interpreter might be in a
> dirty state, forcing you to thoroughly dispose of it if you want to be
> 100% safe.
>
> To kill the requests safely and when you want to, you need
> asynchronous support from the database client APIs and drivers, and
> quite a bit of standardized support code from DBI.
> H
This message and any attachments (the "message") is
intended solely for the addressees and is confidential.
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified.
---------------------------------------------
Ce message et toutes les pieces jointes (ci-apres le
"message") sont etablis a l'intention exclusive de ses
destinataires et sont confidentiels. Si vous recevez ce
message par erreur, merci de le detruire et d'en avertir
immediatement l'expediteur. Toute utilisation de ce
message non conforme a sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf
autorisation expresse. L'internet ne permettant pas
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce
message, dans l'hypothese ou il aurait ete modifie.