diff --git a/setup/start/mysql.cnf b/setup/start/mysql.cnf index 6df9c9903..243b3703f 100644 --- a/setup/start/mysql.cnf +++ b/setup/start/mysql.cnf @@ -4,7 +4,7 @@ # http://bugs.mysql.com/bug.php?id=68514 [mysqld] performance_schema=OFF -max_connections=50 +max_connections=200 # on ec2, without this we get a sporadic connection drop when doing the initial migration max_allowed_packet=64M diff --git a/src/taskworker.js b/src/taskworker.js index 125599b59..925be219a 100755 --- a/src/taskworker.js +++ b/src/taskworker.js @@ -62,7 +62,10 @@ async.series([ database.initialize, settings.initCache ], function (error) { - if (error) return process.exit(50); + if (error) { + console.error(error); + return process.exit(50); + } const debug = require('debug')('box:taskworker'); // require this here so that logging handler is already setup const NOOP_CALLBACK = function (error) { if (error) debug(error); }; @@ -75,11 +78,14 @@ async.series([ debug(`Starting task ${taskId}. Logs are at ${logFile}`); tasks.get(taskId, function (error, task) { - if (error) return process.exit(50); + if (error) { + debug(error); + return process.exit(50); + } tasks.update(taskId, { percent: 2, error: null }, function (error) { if (error) { - console.error(error); + debug(error); return process.exit(50); }