Is it possible to implement connection pooling with luracast restler

I am trying to implement the connection pooling with luracast restler, does any one have and idea how can I implement the connection pooling with restler.

I am using MS SQL and sqlsrv drivers.

https://learn.microsoft.com/en-us/sql/connect/php/connection-options?view=sql-server-ver16&redirectedfrom=MSDN

This is the code snippet from connect method.

 $connection = "sqlsrv:Server=$host,$port;Database=$dbname;ConnectionPooling=1;ConnectRetryCount=$maxRetries;ConnectRetryInterval=$poolRetryInterval;";
                 // connect to the database
                $this->dbh = new \PDO($connection_str, $user, $pass, array(\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION));
                if ($this->dbh) {
                    break;
                }

Any help or ideas would be appreciated.

Leave a Comment