mysql xdevapi崩溃,“队列为空”

cwdobuhd  于 2021-06-20  发布在  Mysql
关注(0)|答案(1)|浏览(406)

我让我的开发机器开了一夜 express 服务器正在运行,当我醒来时,我注意到express服务器已崩溃,出现以下错误:

C:\Users\James\Projects\nine-tails\server\node_modules\@mysql\xdevapi\lib\WorkQueue.js:72
        throw new Error('Queue is empty');
        ^

Error: Queue is empty

错误来自 xdevapi 模块,但我似乎在文档中的队列中找不到任何内容,也找不到发生此错误的原因。
有什么建议吗?
编辑:以下是错误的完整日志:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\James\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'start:express' ]
2 info using npm@6.4.0
3 info using node@v10.8.0
4 verbose run-script [ 'prestart:express', 'start:express', 'poststart:express' ]
5 info lifecycle server@1.0.0~prestart:express: server@1.0.0
6 info lifecycle server@1.0.0~start:express: server@1.0.0
7 verbose lifecycle server@1.0.0~start:express: unsafe-perm in lifecycle true
8 verbose lifecycle server@1.0.0~start:express: PATH: C:\Users\James\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\James\Projects\nine-tails\server\node_modules\.bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\James\bin;C:\Python37\Scripts;C:\Python37;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\PuTTY;C:\metasploit-framework\bin;C:\tools\php72;C:\Users\James\AppData\Local\Microsoft\WindowsApps;C:\Users\James\AppData\Roaming\npm;C:\Program Files\Docker Toolbox;C:\Users\James\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\James\AppData\Local\GitHubDesktop\bin
9 verbose lifecycle server@1.0.0~start:express: CWD: C:\Users\James\Projects\nine-tails\server
10 silly lifecycle server@1.0.0~start:express: Args: [ '/d /s /c',
10 silly lifecycle   'cross-env NODE_ENV=development DEBUG=express,database,routes node server.js' ]
11 silly lifecycle server@1.0.0~start:express: Returned: code: 1  signal: null
12 info lifecycle server@1.0.0~start:express: Failed to exec start:express script
13 verbose stack Error: server@1.0.0 start:express: `cross-env NODE_ENV=development DEBUG=express,database,routes node server.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\James\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:304:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\James\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:962:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:249:5)
14 verbose pkgid server@1.0.0
15 verbose cwd C:\Users\James\Projects\nine-tails\server
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\James\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "start:express"
18 verbose node v10.8.0
19 verbose npm  v6.4.0
20 error code ELIFECYCLE
21 error errno 1
22 error server@1.0.0 start:express: `cross-env NODE_ENV=development DEBUG=express,database,routes node server.js`
22 error Exit status 1
23 error Failed at the server@1.0.0 start:express script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

C:\Users\James\Projects\nine-tails\server\node_modules\@mysql\xdevapi\lib\WorkQueue.js:72
        throw new Error('Queue is empty');
        ^

Error: Queue is empty
    at WorkQueue.process (C:\Users\James\Projects\nine-tails\server\node_modules\@mysql\xdevapi\lib\WorkQueue.js:72:15)
    at Client.handleServerMessage (C:\Users\James\Projects\nine-tails\server\node_modules\@mysql\xdevapi\lib\Protocol\Client.js:201:21)
    at Client.handleNetworkFragment (C:\Users\James\Projects\nine-tails\server\node_modules\@mysql\xdevapi\lib\Protocol\Client.js:245:14)
    at TLSSocket.stream.on.data (C:\Users\James\Projects\nine-tails\server\node_modules\@mysql\xdevapi\lib\Protocol\Client.js:65:36)
    at TLSSocket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:283:12)
    at readableAddChunk (_stream_readable.js:264:11)
    at TLSSocket.Readable.push (_stream_readable.js:219:10)
    at TLSWrap.onread (net.js:639:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! server@1.0.0 start:express: `cross-env NODE_ENV=development DEBUG=express,database,routes node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the server@1.0.0 start:express script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\James\AppData\Roaming\npm-cache\_logs\2018-09-05T09_06_40_255Z-debug.log
2guxujil

2guxujil1#

不应该发生,除非x插件(mysql服务器)正在发送一些带外消息或意外消息(这将非常奇怪)。
不管怎么说,这没什么用。也许你可以扩展你的日志基础设施(或者在连接器中搞乱一点响应处理程序),看看到底发生了什么。
如果您发现一些有趣的东西,我建议您使用 Connector for Node.js 类别。
免责声明:我是项目负责人。

相关问题