sidorares/node-mysql2

node-mysql2 hangs for long time without showing anything

オープン

#695 opened on 2017/12/06

 (26 件のコメント) (2 件のリアクション) (0 人の担当者)TypeScript (677 件のフォーク)github user discovery
help wantedneeds investigationneeds reproduction

Repository metrics

Stars
 (4,383 個のスター)
PR merge metrics
 (平均マージ 18h 50m) (30d で 29 merged PRs)

説明

I have a script, that makes heavy use of node-mysql2. It inserts large number of rows into db, then proceeds to make further modifications to those rows. First part is run as separate promise with lots of async/await.

After the first part, during the early stages of second part script suddenly hangs (at first I attributed that to some kind of terminal IO glitch, but the behaviour is reproducible in different terminals both on Windows and Linux). mysql processlist looks like this

+-----+------+-----------+------+---------+------+-------+-----------------------+----------+
| Id  | User | Host      | db   | Command | Time | State | Info                  | Progress |
+-----+------+-----------+------+---------+------+-------+-----------------------+----------+
| 130 | root | localhost | basa | Sleep   |    1 |       | NULL                  |    0.000 |
| 133 | root | localhost | NULL | Query   |    0 | init  | SHOW FULL PROCESSLIST |    0.000 |
+-----+------+-----------+------+---------+------+-------+-----------------------+----------+

Interestingly, running the first and second part of script separately eliminates the issue.

コントリビューターガイド