Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building the WebUI uses too many resources in a limited resource environment #484

Open
3 tasks
d-ylee opened this issue Oct 2, 2024 · 0 comments
Open
3 tasks
Labels
DevOps Building, Testing/CI and Releasing of Rucio UI

Comments

@d-ylee
Copy link

d-ylee commented Oct 2, 2024

Description

In our k8s cluster, our resources are limited. When deploying the WebUI with the official rucio/helm-charts, the pod that builds the webui crashes. The error in the logs is:

uncaughtException Error: spawn /usr/bin/node EAGAIN
  at ChildProcess._handle.onexit (node:internal/child_process:286:19)
  at onErrorNT (node:internal/child_process:484:16)
  at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
    errno: -11,
    code: 'EAGAIN',
    syscall: 'spawn /usr/bin/node',
    path: '/usr/bin/node',
    spawnargs: [
      '/opt/rucio/webui/node_modules/next/dist/compiled/jest-worker/processChild.js'
    ]
  }

This could be due to the pod requesting more processes or threads that is available.

Motivation

Some environments where the WebUI will be deployed in have limited resources, which would need to be accounted for, especially since the WebUI needs to be built every time it is deployed.

Change

According to https://kdaws.com/learn/fixing-next-js-error-spawn-errno-11-on-cpanel-and-plesk-with-cloudlinux/, there is a configuration in next.config.js that can be set:

module.exports = {
  distDir: 'build',
  experimental: {
    // This is experimental but can
    // be enabled to allow parallel threads
    // with nextjs automatic static generation
    workerThreads: false,
    cpus: 4
  }
};

In my use case, setting cpus: 1 and manually running docker-entrypoint.sh in our pod allows the build to work.

Additional Information

  • It is related to the Storybook?
  • It is related to the GitHub Actions?
  • It is related to the developer tools?
@d-ylee d-ylee added the DevOps Building, Testing/CI and Releasing of Rucio UI label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevOps Building, Testing/CI and Releasing of Rucio UI
Projects
None yet
Development

No branches or pull requests

1 participant