You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am supposing I should use PDO::ATTR_TIMEOUT => 2, however, it was not working either and moreover, ATTR_TIMEOUT is for connections.. not for MYSQL READ TIMEOUTS.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Laravel Community!
I have a need to set a client-side timeout for the database SELECT queries, I have come along the following parameter - MYSQLI_OPT_READ_TIMEOUT .
I have tried setting it up in the database.php under "options", however, that did not work.
The goal is to ensure that if the "select" query is taking longer than "x" seconds, terminate it from the client side.
This would ensure that client is closing the queries because they are running too long, instead of the MySQL database terminating them.
Kindly share your thoughts on this. Thank you.
database.php is below:
I am supposing I should use PDO::ATTR_TIMEOUT => 2, however, it was not working either and moreover, ATTR_TIMEOUT is for connections.. not for MYSQL READ TIMEOUTS.
Best regards,
Vadim
Beta Was this translation helpful? Give feedback.
All reactions