mysqljs/mysql

Connection error details with a pool cluster with canRetry=true

Open

#1.612 aberto em 26 de dez. de 2016

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (2.502 forks)batch import
help wanted

Métricas do repositório

Stars
 (18.137 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

When using pool cluster with canRetry=true, it would be nice to log all node connection errors to later investigate what was the problem. But while it is possible to subscribe to 'offline' event on PoolCluster, it does not provide error details why node was put offline.

Is there any way to get connection errors info from PoolCluster other than not using "canRetry=true" and doing re-tries manually?

Emitting something like 'node-error' event on PoolCluster with node and error details would be nice. Another way can be accumulating errors in node object and passing them into 'offline' event.

Guia do colaborador