php - How to set timeout for Laravel artisan -


how set timeout artisan job? , when time out job killed.

i'm using laravel 5.0 on application.i scheduled artisan jobs every minute in app/console/kernel.php. when grep jobs

ps -ef | grep artisan 

it seems every job running in separate process.

root 23322 1 0 13:44 ? 00:00:00 xxx/php-5.5.7/bin/php artisan fetchtopic 0 10 1

root 23324 1 0 13:44 ? 00:00:00 xxx/php-5.5.7/bin/php artisan fetchtopic 0 10 2

root 23326 1 0 13:44 ? 00:00:00 xxx/php-5.5.7/bin/php artisan fetchcomment

and when 1 job finish task, process killed automatically. strange of processes not killed normally. , on time, more , more strange processes permanent lead cpu 100%. want set timeout artisan job, when time out job killed automatically.

i checked laravel code , there no graceful way of killing these long artisan processes.

however can limit overall php execution time on own risk. can use function set_time_limit() or add max_execution_time in php.ini


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -