diff --git a/src/apps.js b/src/apps.js index 306746e0f..d8251b299 100644 --- a/src/apps.js +++ b/src/apps.js @@ -621,6 +621,8 @@ function scheduleTask(appId, installationState, taskId, callback) { if (installationState === exports.ISTATE_PENDING_BACKUP || installationState === exports.ISTATE_PENDING_CLONE || installationState === exports.ISTATE_PENDING_RESTORE || installationState === exports.ISTATE_PENDING_IMPORT || installationState === exports.ISTATE_PENDING_UPDATE) { memoryLimit = 'memoryLimit' in backupConfig ? Math.max(backupConfig.memoryLimit/1024/1024, 400) : 400; + } else if (installationState === exports.ISTATE_PENDING_DATA_DIR_MIGRATION) { + memoryLimit = 1024; // cp takes more memory than we think } const options = { timeout: 20 * 60 * 60 * 1000 /* 20 hours */, nice: 15, memoryLimit };