api.commands.start()
/stop
/restart
this
to these commands. You can call them directly.Users with a misconfigured ioredis
config, or those running Docker containers where the Redis service may not yet be fully started, may see heavy log spam during AH's boot cycle. The defaultioredis
configuration auto-reconnects every 50ms and can rapidly exhaust a log before an admin sees what's going on.
This change does two things:
It provides a staged back-off interval for reconnection attempts up to a maximum, currently set at a low, safe 1 second.
It provides a much longer reconnection delay for the FIRST attempt, with a convenience message for the admin:
2016-08-23T15:50:41.378Z - notice: * Starting ActionHero *
>> 2016-08-23T15:50:41.389Z - error: Redis connection `client` error Error: connect ECONNREFUSED 127.0.0.1:6379
>> at Object.exports._errnoException (util.js:870:11)
>> at exports._exceptionWithHostPort (util.js:893:20)
>> at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)
>> 2016-08-23T15:50:41.390Z - error: Unable to connect to Redis - please check your Redis config!
When you listen on the "connected" event on the websocket connect and you fire immediately a action over the client lib the "actionWeb" function is used instead of the "actionWebSocket" function because self.state = 'connected';
is set after the "connected" event is emitted. This change corrects this.
workerTitlePrefix
option to start cluster
to modify your child process names (thanks @ericli1018!)startCluster
(it is start
cluster` now)!