SailsJS is unstable on elastic Amazon beanstalk

I am using sails on unrolling autoscale elastic bobstitch but things go wrong, seems very erratic.

For example, (apparently) in blue, the following custom model method that has been working fine for the last 3 months or so has 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 the site started for a couple of hours.

Another example

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

      

Suddenly started returning a user model with its associations filled with inline objects ... which on save started throwing waterline errors due to inline entries.

My guess is that sail dependencies are updated when elastic beanstalk is deploying new servers and some of those dependencies change the way the sails work.

Or I am completely unfamiliar and something else is happening. Anyway, I'm very nervous that a pretty busy site will crash at any moment.

Does anyone have any suggestions as to what is going on. Or have you had similar experiences.

Muchos gracias.

+3


source to share


1 answer


I am guessing the sail dependencies are updated when the elastic boom rolls deploy new servers,

If you're using it npm install

as part of your production deployment while scaling your infrastructure, you're in trouble. You must pre-package the application with npm into one tarball and install it. What if someone cancels one of your dependencies? The npm dependency graph can be several dozen layers. If something changes at any of these levels, you may see problems.



If you have important deployment issues / questions please contact the company: sailsjs.com/about

0


source







All Articles