Jaden_Adams Posted November 30, 2017 Share 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? Link to comment Share on other sites More sharing options...
ragempdev Posted November 30, 2017 Share 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. Link to comment Share on other sites More sharing options...
Jaden_Adams Posted November 30, 2017 Author Share 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? Link to comment Share on other sites More sharing options...
Jaden_Adams Posted November 30, 2017 Author Share Posted November 30, 2017 Только что, kemperrr сказал: do you use mysql? Yes Link to comment Share on other sites More sharing options...
Jaden_Adams Posted November 30, 2017 Author Share Posted November 30, 2017 Только что, kemperrr сказал: Then the problem in it Thanks for the advice, I'll check and will unsubscribe about results Link to comment Share on other sites More sharing options...
Jaden_Adams Posted November 30, 2017 Author Share 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! Link to comment Share on other sites More sharing options...
Jaden_Adams Posted November 30, 2017 Author Share 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' } Link to comment Share on other sites More sharing options...
Jaden_Adams Posted November 30, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now