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

Restreamer-UI takes way too much resources - crashes #12

Closed
royvandongen opened this issue Aug 17, 2022 · 2 comments
Closed

Restreamer-UI takes way too much resources - crashes #12

royvandongen opened this issue Aug 17, 2022 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@royvandongen
Copy link

royvandongen commented Aug 17, 2022

While running Restreamer-UI i have noticed the process taking up upto 100% cpu and 2gigs of memory (just the UI). while using the composefile below:

When adding mem_limit: 500m and cpus:0.50, the ui wont even start anymore. indicating something might be wrong with the ui (process node /ui/node_modules/react-scripts/start.js is running at max cpu). 500Megabyte of memory and 1.5Ghz should be plenty to run a basic gui under normal circumstances.

Also the documentation lacks explanaition about the current state of restreamer-ui and the posibility to connect to the core at the correct methods.

docker logs output:

> react-scripts start

ℹ 「wds」: Project is running at http://172.20.0.3/
ℹ 「wds」: webpack output is served from 
ℹ 「wds」: Content not from webpack is served from /ui/public
ℹ 「wds」: 404s will fallback to /
Starting the development server...

The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.

docker-compose.yml:

services:
  restreamer:
    image: datarhei/core:latest
    container_name: restreamer
    restart: always
    ports:
      - 8080:8080
      - 1935:1935
    volumes:
      - /opt/datarhei/data/core/config:/core/config
      - /opt/datarhei/data/core/data:/core/data
    environment:
      - CORE_API_AUTH_USERNAME=${API_USERNAME}
      - CORE_API_AUTH_PASSWORD=${API_PASSWORD}
      - CORE_RTMP_ENABLE=true
      - CORE_RTMP_ADDRESS=:1935
      - CORE_RTMP_APP=/live
      - CORE_METRICS_ENABLE=true
      - CORE_METRICS_ENABLE_PROMETHEUS=true
  restreamer-gui:
    image: datarhei/restreamer-ui:latest
    container_name: restreamer-gui
    restart: always
    depends_on:
      - restreamer
    ports:
      - 3000:3000```
@ioppermann
Copy link
Member

The Docker image starts the development server for the UI which runs the unoptimized code. We checked in changes, that will start the Caddy webserver serving the static optimized build of the UI. This will result in a smaller image size and less CPU and memory usage.

@svenerbeck svenerbeck added the question Further information is requested label Nov 1, 2022
@ioppermann
Copy link
Member

Has already been resolved with the latest releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants