The #client.on()-calls will install the handlers forever.
In long running instances, each request installs a handler which will subsequently be called on each message which is received. That means it will pile up, soak up ultimately all memory and increase CPU on the path to hell ;)
The solution could be .once() instead of .on()
The #client.on()-calls will install the handlers forever. In long running instances, each request installs a handler which will subsequently be called on each message which is received. That means it will pile up, soak up ultimately all memory and increase CPU on the path to hell ;) The solution could be .once() instead of .on()