Jaden_Adams 0 Posted November 30, 2017 Start the server, runs about a minute and the server crashes with the error: events.js:5838: Uncaught Error: Connection Lost: The server closed the connection. But I have no file events.js. Not in the server files, not client files, it is not! What could be the problem? Share this post Link to post Share on other sites
ragempdev 792 Posted November 30, 2017 10 minutes ago, Jaden_Adams said: Start the server, runs about a minute and the server crashes with the error: events.js:5838: Uncaught Error: Connection Lost: The server closed the connection. But I have no file events.js. Not in the server files, not client files, it is not! What could be the problem? There's a problem in your script. Try without server-side scripts. Share this post Link to post Share on other sites
Jaden_Adams 0 Posted November 30, 2017 4 минуты назад, ragempdev сказал: There's a problem in your script. Try without server-side scripts. I'll check without the mod, if this is true, then what could be the problem? Share this post Link to post Share on other sites
Jaden_Adams 0 Posted November 30, 2017 Только что, kemperrr сказал: do you use mysql? Yes Share this post Link to post Share on other sites
Jaden_Adams 0 Posted November 30, 2017 Только что, kemperrr сказал: Then the problem in it Thanks for the advice, I'll check and will unsubscribe about results Share this post Link to post Share on other sites
Jaden_Adams 0 Posted November 30, 2017 21 минуту назад, kemperrr сказал: https://stackoverflow.com/questions/20210522/nodejs-mysql-error-connection-lost-the-server-closed-the-connection Rewrote the connection for this example and the problem no longer occurs, thanks! Share this post Link to post Share on other sites
Jaden_Adams 0 Posted November 30, 2017 The server stopped falling, but the console spam errors: db error { Error: Connection lost: The server closed the connection. at Protocol.end (E:\RAGEMP\server-files\node_modules\mysql\lib\protocol\Protocol.js:113:13) at Socket.<anonymous> (E:\RAGEMP\server-files\node_modules\mysql\lib\Connection.js:109:28) at emitNone (events.js:110:20) at Socket.emit (events.js:207:7) at endReadableNT (_stream_readable.js:1059:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) fatal: true, code: 'PROTOCOL_CONNECTION_LOST' } Share this post Link to post Share on other sites
Jaden_Adams 0 Posted November 30, 2017 53 минуты назад, Jaden_Adams сказал: The server stopped falling, but the console spam errors: db error { Error: Connection lost: The server closed the connection. at Protocol.end (E:\RAGEMP\server-files\node_modules\mysql\lib\protocol\Protocol.js:113:13) at Socket.<anonymous> (E:\RAGEMP\server-files\node_modules\mysql\lib\Connection.js:109:28) at emitNone (events.js:110:20) at Socket.emit (events.js:207:7) at endReadableNT (_stream_readable.js:1059:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) fatal: true, code: 'PROTOCOL_CONNECTION_LOST' } Found the solution! It is necessary to prescribe: connection.query("SET SESSION wait_timeout = 604800"); // 7 days timeout Share this post Link to post Share on other sites