adding more than one hour of scheduled tasks to onWorkerStart in GatewayWorker businessworker will cause register verification errors to report pid:1 Register auth timeout (127.0.0.1). See http://wiki.workerman.net/Error4 for detail error,
find the reason for the connectToRegister method $this- > _ registerConnection- > send in the BusinessWorker class ("{"event": "worker_connect", "secret_key": ". $this- > secretKey.""}"); failed to send the message successfully,
guess the reason: the sending statement is not executed after the link is successful, and the scheduled task that is added for more than an hour blocks the _ registerConnection link ().
the solution changes $this- > _ registerConnection- > send ("{"event": "worker_connect", "secret_key": ". $this- > secretKey.""}");
to:
$this- > _ registerConnection- > onConnect = function ()
{
$this->_registerConnection->send("{"event":"worker_connect","secret_key":"" . $this->secretKey . ""}");
};