laravel / octane

Supercharge your Laravel application's performance.
https://laravel.com/docs/octane
MIT License
3.76k stars 293 forks source link

A way to set execution time limit for a current request #916

Closed alecpl closed 3 months ago

alecpl commented 3 months ago

Normally I would set_time_limit(0) for a specific type of request, and let others be limited. However, set_time_limit() does not work under Octane (Swoole) and octane.max_execution_time is enforced on all processes. It's done by the server and set when the server starts.

I'd like to implement this possibility, but I'd need some help with that. I've found EnsureRequestsDontExceedMaxExecutionTime that uses timerTable created in bin/createSwooleTimerTable.php. So, I suppose I could modify (move forward) the 'time' property in that table or introduce another column with max_execution_time. Would that work?

driesvints commented 3 months ago

Thank you. Right now we don't have plans to contribute to this feature ourselves. Should you need help with trying to build a PR for this it's best that you try a support channel: