Node JS Mysql PROTOCOL ENQUEUE AFTER FATAL ERROR

前端 未结 2 946
耶瑟儿~
耶瑟儿~ 2020-12-16 12:55

What does the error mean?

{ [Error: Cannot enqueue Query after fatal error.] code: \'PROTOCOL_ENQUEUE_AFTER_FATAL_ERROR\', fatal: false }

T

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-16 13:31

    I had similar issue connecting with MySQL. I solved this issue using connection pool. The concept is to get a connection from a connection pool only when required and release it after use. That way the connection will not be in unstable state. You can get implementation details here.

提交回复
热议问题