Skip to content

Commit 799ae61

Browse files
committed
Fix OOM errors for homepage
1 parent 3cf15e7 commit 799ae61

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/homepage/gatsby-node.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,13 @@ exports.onCreateWebpackConfig = ({
256256
},
257257
];
258258

259+
if (process.env.CIRCLECI && config.optimization) {
260+
// eslint-disable-next-line no-console
261+
console.log('Setting new parallel option for CircleCI');
262+
// CircleCI has 32cpu cores, but only 2 for us. os.cpu().length gives back 32, which always results in OOM
263+
config.optimization.minimizer[0].options.parallel = 2;
264+
}
265+
259266
// This will completely replace the webpack config with the modified object.
260267
actions.replaceWebpackConfig(config);
261268
};

0 commit comments

Comments
 (0)