cachewerk / bref-laravel-bridge

An advanced Laravel integration for Bref, including Octane support.
MIT License
38 stars 8 forks source link

Support persistent database connection #2

Closed tillkruss closed 2 years ago

tillkruss commented 2 years ago

Let's focus on PostgreSQL, but why would ANYONE use something else.

PostgreSQL 9.6 upwards supports idle_in_transaction_session_timeout.

SET SESSION idle_in_transaction_session_timeout = '5min';

https://stackoverflow.com/a/41818410

It's fairly straight forward: https://github.com/laravel/vapor-core/blob/7ea7c0001795768a0fcb43d89524a7ac1cfef533/src/Runtime/Octane/Octane.php#L60-L125