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'm running OS X as the host environment, on which I'm powering Homestead Improved. I installed Jobby into one such environment (namely nofw) as an experiment, but skipping the config file etc, basically directly hitting the jobby file. The jobby file looks something like this in this experimental demo stage:
So two fake jobs and a basic "global" settings array. The DB calls above are there just for show, the DB is empty. That entire part can be removed.
Anyway. You'll notice the first job has a bogus command: dateffds. This throws a normal error any time when called on the command line. The jobby file itself does not hang when called directly from the command line, and there's nothing execute, so it's odd to be constantly getting this from job1:
I then looked into lockfiles and explored the Helper class, where I then added some logging calls to each IF block, in order to pinpoint what fails and when. This is what I got, side by side (inside.log are log entries from within Helper, while j1.log is output from job 1):
These are the forced logging messages I added to Helper:
/** * @param string $lockFile * * @return int */publicfunctiongetLockLifetime($lockFile)
{
$l = newLogger('foo');
$l->pushHandler(newStreamHandler(__DIR__.'/../../../../logs/inside.log'));
if (!file_exists($lockFile)) {
$l->info("File does not exist");
return0;
}
$pid = file_get_contents($lockFile);
if (empty($pid)) {
$l->info("PID is empty");
return0;
}
if (!posix_kill(intval($pid), 0)) {
$l->info("No posix kill");
return0;
}
$stat = stat($lockFile);
$l->info("All good");
return (time() - $stat["mtime"]);
}
If you have any ideas on what I should test next, please let me know, though you'd probably see it most clearly if you tried it out on Homestead Improved - it's just a basic Ubuntu 14.04 box with PHP 7.
More info:
the tmp files are not in a shared folder, it can't be fighting with the host OS for control over lockfiles
the tmp files are not visible in my IDE, so they're not being fought over on that front either
at first, it worked without these timeouts
after a reboot of the VM (once the tmp files are killed off), the situation resumes as soon as the files are recreated. So just one successful call and we're back to the timeouts again.
The text was updated successfully, but these errors were encountered:
Note that if I omit the maxRuntime config value, the job runs correctly and doesn't block - the output is accurately generated every minute, as opposed to every third time like when maxRuntime is still on.
I'm running OS X as the host environment, on which I'm powering Homestead Improved. I installed Jobby into one such environment (namely nofw) as an experiment, but skipping the config file etc, basically directly hitting the jobby file. The jobby file looks something like this in this experimental demo stage:
So two fake jobs and a basic "global" settings array. The DB calls above are there just for show, the DB is empty. That entire part can be removed.
Anyway. You'll notice the first job has a bogus command:
dateffds
. This throws a normal error any time when called on the command line. The jobby file itself does not hang when called directly from the command line, and there's nothing execute, so it's odd to be constantly getting this from job1:I then looked into lockfiles and explored the Helper class, where I then added some logging calls to each IF block, in order to pinpoint what fails and when. This is what I got, side by side (
inside.log
are log entries from withinHelper
, whilej1.log
is output from job 1):These are the forced logging messages I added to Helper:
If you have any ideas on what I should test next, please let me know, though you'd probably see it most clearly if you tried it out on Homestead Improved - it's just a basic Ubuntu 14.04 box with PHP 7.
More info:
tmp
files are not in a shared folder, it can't be fighting with the host OS for control over lockfilestmp
files are not visible in my IDE, so they're not being fought over on that front eitherThe text was updated successfully, but these errors were encountered: