We are using a Lumen 5.2.x (Laravel) application to get data from a Oracle Database. For that reason we use oci_connect()
to connect to the database. (Extra info: we use Oracle instantclient)
For a reason unknown, the application was not responsive and wouldn't return any data. After lots of hours debugging we found out that it got stuck in that very same method: oci_connect()
. Apparently the function did not return a 'time-out'-message or anything similar.
Later, it seemed the database moved to another host, which is the reason it couldn't connect. However, we expected a error, instead of a huge amount of waiting.
This is the reason we are trying to force a time-out to be set, until now this has not worked out.
Things we have tried:
Adding this to the connection string:
(CONNECT_TIMEOUT=10)(RETRY_COUNT=3)
which is completely ignored.Setting
max_execution_time
andset_time_limit
to1
Adding a
sqlnet.ora
with settings:TCP.CONNECT_TIMEOUT=10 SQLNET.INBOUND_CONNECT_TIMEOUT=10 SQLNET.OUTBOUND_CONNECT_TIMEOUT=10
Everything we have tried failed, does anyone know how to work around this bug? Any help is appreciated!
Edit: System info: Windows Server 2012 R2, IIS 8, PHP 5.6