laravel-oci8
laravel-oci8 copied to clipboard
How to close connection using oci_close() ?
Anyone know to manually close the connection using oci_close() function ? becase it seems like my production server oracle connection pool is full with the idle connection
Thanks !
normally everything is closed automatically by __destruct
must be some issues with your shutdown process in your app...
When using connection in laravel jobs, connection not close after to end execute, need add method close() or disconnect().
/vendor/yajra/laravel-pdo-via-oci8/src/Pdo/Oci8.php
public function disconnect(){
oci_close($this->dbh);
}
okay yeah this could be added of course,
but did you try to enable persistent connection? internally it uses pconnect
see: https://github.com/yajra/pdo-via-oci8/blob/c85f61cf38f7251d1091cddb9e62f261c421075a/src/Pdo/Oci8.php#L454
I dont use PDO::ATTR_PERSISTENT in $options.
@seminsergey than please try it out, usually its a really good idea to use persistent connections to dbs etc..... helps you to reduce connection overhead...
@mstaack limit max_connection does not allow me to use a persistent connection.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 7 days since being marked as stale.