jeudi 22 septembre 2016

Laravel scheduler command never runs a 2nd time

I've configured scheduler to run once every minute to execute two commands:

$schedule->command('amazon:read-sqs')
    ->everyMinute()
    ->runInBackground()
    ->withoutOverlapping()
    ->sendOutputTo(storage_path('logs/cmd/amazon_read_sqs.log'), true)
    ->thenPing('http://ift.tt/2d4K9xe');

$schedule->command('jobs:dispatcher', ['--max' => 100])
    ->everyMinute()
    ->runInBackground()
    ->withoutOverlapping()
    ->sendOutputTo(storage_path('logs/cmd/jobs_dispatcher.log'), true)
    ->thenPing('http://ift.tt/2crSltj');

It's been running great for the past month of development. However, right after converting our AWS instance from micro to small (no other changes), the scheduler suddenly never executes after the first time.

In other words, if the schedule is set to every minute in Forge, it runs once and then never appends the logs.

I added Envoyer heartbeats to track it every 10 min but it doesn't trigger the thenPing() method to notify Envoyer...even after that first run.

I can delete the cron entry and recreate it, forcing it to run that one time.

All of these run fine if they are given their own cronjob.

When I check for any /storage/framework/schedule-* lock files, I find nothing to delete that could be blocking them.

Nothing in the Laravel log files showing a problem.

Any ideas?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire