numtel / meteor-mysql

Reactive MySQL for Meteor
MIT License
343 stars 41 forks source link

Error when deploying to Heroku #66

Open freekp opened 8 years ago

freekp commented 8 years ago

I'm using meteor-mysql in a small meteor app which works fine when I run it locally but I can't seem to get it working on Heroku as it keeps crashing. I've checked the connection settings and the code is very simple, but perhaps I have overlooked something. Below is the code and the error. Any insights or help would be appreciated.

var liveDb = new LiveMysql({
    host: '*',
    port: 3306,
    user: '*',
    password: '*',
    database: '*'
  });

  var closeAndExit = function() {
    liveDb.end();
    process.exit();
  };
  // Close connections on hot code push
  process.on('SIGTERM', closeAndExit);
  // Close connections on exit (ctrl + c)
  process.on('SIGINT', closeAndExit);

  Meteor.publish('skill', function() {
    return liveDb.select(
      'SELECT * FROM skill',
      [ { table: 'skill' } ]
    );
  });
2016-04-27T19:42:35.833974+00:00 app[web.1]:     at Query._callback (/app/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/numtel_mysql/node_modules/mysql-live-select/node_modules/zongji/index.js:127:9)

2016-04-27T19:42:35.833975+00:00 app[web.1]:     at Query._handleFinalResultPacket (/app/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/numtel_mysql/node_modules/mysql/lib/protocol/sequences/Query.js:144:8)

2016-04-27T19:42:35.833976+00:00 app[web.1]:     at Query.OkPacket (/app/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/numtel_mysql/node_modules/mysql/lib/protocol/sequences/Query.js:78:10)

2016-04-27T19:42:36.754204+00:00 heroku[web.1]: Process exited with status 8

2016-04-27T19:42:37.740544+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/websocket" host=* request_id=99121c0f-8ad8-4869-a521-c433909b18eb fwd="54.155.218.212" dyno= connect= service= status=503 bytes=
SantoshSrinivas79 commented 8 years ago

@numtel I'm also getting a ECONNREUSED error on pushing with mupx. The app works when I run using meteor in the development directory.

Any hints on what needs to be done to deploy the app with mupx?