I know some people might have come across this error before ( I did at least), where the bot would time out from the mysql database. The solution is pretty simple when you think about it.
Inside your trade bots script find the mysql connection code or add it as it's needed to connect to the mysql database.
var mysql = require('mysql'); var connection = mysql.createConnection({ host : '', // MySQL Host user : '', // MySQL User password : '', // MySQL Password database : '' // MySQL Databse });
Finally you want to add this to the bottom of your script so it checks for a connection every 5 seconds. (You can change this to pretty much any code you want that loops the connection or checks for it or w.e. I just know this gets the job done :^.)
setInterval(function () { connection.query('SELECT 1'); }, 5000);
Edited by androidphreak, 02 May 2016 - 11:28 PM.