Hi guys,
so I’m having this issue that appears every so often when I’m running 15 simultaneous angular build jobs. The errors seem to be consistently these:
Now I am not sure if this has something to do with the typescript code itself, but the machine where these jobs are running is pretty strong, a Digitalocean Premium Intel Compute droplet with 48 cores and 96GB of RAM. I noticed that when the number of executors are set to 12, this issue almost never appears, but the moment I set the number of executors to match the number of the apps built it sometimes starts doing this. This could be an issue that’s not related to Jenkins or the Linux machine itself, but it’s still worth to ask.
It is not clear wheteher the number of apps built is greater or lower than 12 – but from personal experience I would advise going with a bunch of smaller machines with 1 executor on them, rather than with a single beefed up machine with 12 executors.
Jenkins itself handles parallelism quite fine, separating workspaces where jobs land via folder/job, folder/job@2, folder/job@3 suffixes. So as long as everything that you use can be “contained” to the current directory – your pipeline is fine. But some of the tools you might run on it really don’t appreciate it when there are 3-4 other instances of said tool running at once; usually due to some caching mechanisms.
I am not sure if JS/TS ecosystem would be to blame here, as it tends to write stuff to ./.node_nodules, and . would already be @prefixed by Jenkins – but this is kind of a general rule I try to follow these days. At the very least, it is easier to reason about resources (CPU, RAM) when you have only 1 Jenkins job run per 1 machine.