When I call pgx.Conn.Ping method to check if a connection is alive or call WaitForNotification
sometime return conn is busy Error ? how to avoid it ?
ErrConnBusy occurs when the connection is busy (for example, in the middle of reading query results) and another action is attempted. This error indicates a bug in your application or in pgx. It should never occur in correct operation.
You might have forgotten to rows.Close() or close a transaction.
Most helpful comment
You might have forgotten to
rows.Close()or close a transaction.