vendredi 29 mai 2015

SailsJS is unstable on Amazon elastic beanstalk

I'm using sailsJS on an elastic beanstalk auto-scaling deployment, but things are misbehaving, it seems very unstable.

For example, (seemingly) out of the blue the following custom model method, that had been running fine for the last 3 months or so, stopped working

var obj = this.toObject();
obj.permissions = obj.getPermissions();

Changing the code to

var obj = this.toObject();
obj.permissions = this.getPermissions();

fixed the problem, but only after bringing the site down for a couple of hours.

Another example

User.findOne({ id: 'someIDstring' }, function(err, user) { ... });

Suddenly started returning a user model with its associations populated with embedded objects... which when saved started throwing waterline errors due to the embedded records.

My guess is that the dependencies of sails are being updated when elastic beanstalk is spinning up new servers, and some of those dependencies are changing the way that sails is running.

Or I'm completely off the mark and something else is happening. Either way I'm getting very nervous that a rather busy site is going to fall over at any time.

Does anyone have any suggestions as to what's going on. Or have had any similar experiences.

Muchos gracias.




Aucun commentaire:

Enregistrer un commentaire