PHP.nl

oci_set_call_timeout

oci_set_call_timeout

Sets a millisecond timeout for database calls

bool **oci_set_call_timeout** resource $connection int $timeout

Sets a timeout limiting the maximum time a database round-trip using this connection may take.

Each OCI8 operation may make zero or more calls to Oracle's client library. These internal calls may then may make zero or more round-trips to Oracle Database. If any one of those round-trips takes more than milliseconds, then the operation is cancelled and an error is returned to the application. time_out

The  value applies to each round-trip
individually, not to the sum of all round-trips.  Time spent
processing in PHP OCI8 before or after the completion of each
round-trip is not counted.

time_out

When a call is interrupted, Oracle will attempt to clean up the
connection for reuse.  This operation is allowed to run for
another  period.  Depending on the
outcome of the cleanup, the connection may or may not be reusable.

time_out

When persistent connections are used, the timeout value will be retained across PHP requests.

The function is available when OCI8 uses Oracle 18 (or later) Client libraries. oci_set_call_timeout

connection``timeoutThe maximum time in milliseconds that any single round-trip between PHP and Oracle Database may take.

return.success

Voorbeeld: Setting the timeout

<?php

$conn = oci_connect('hr', 'welcome', 'localhost/XE');
oci_set_call_timeout($conn, 5000);

?>