Radagast
Radagast

Reputation: 5958

sails.js not lifting after data migration

I use sails.js with MongoDB as primary place for my models. I've just completed data migration from production DB, and now there are several hundred thousands documents in some collections.

But there is a problem. When I try to sails lift i'm getting the following log:

...

verbose: views hook loaded successfully.
verbose: Setting default Express view engine to ejs...
verbose: Starting ORM...
FATAL ERROR: JS Allocation failed - process out of memory

And i see no reasons why this happens. There is enought free memory. Database is not too big, i have much bigger Mongo databases, working well and fast at the same node configuration. Does anyone have any ideas where to dig?

Upvotes: 2

Views: 363

Answers (1)

Radagast
Radagast

Reputation: 5958

It seems, the problem lurked in SailsJS attempts to auto-migrate relatively big database. In my case i just had to change migrate: 'alter' to migrate: 'safe' in config/models.js.

Upvotes: 2

Related Questions