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

[bug] Abnormal CPU, Memory usage within Ubuntu 24.04(noble-20240605), Nginx 1.24.0 #267

Open
HeeJoon-Kim opened this issue Jul 18, 2024 · 0 comments

Comments

@HeeJoon-Kim
Copy link

When upgrade a os and nginx version, server's performance was badly low.
A cpu and memory usage increased, especially memory usage dramatically increased.
And load average, %iowait had a bad status.

I don't know why, but when killed a nginx, server was back to normal.

Expected behavior

Normal cpu, memory usage - Ubuntu 23.04(lunar-20230615, Nginx 1.22.0)

08B50B7D-5BF2-48DD-B1C5-274147F5F036

Actual behavior

High cpu and memory usage with high %iowait. And very high load average.

CC0EBF45-43EF-4518-8CEC-5B37FACE55EF

OS and Nginx version

Normal: OS Ubuntu 23.04 lunar-20230615(Docker), Nginx 1.22.0(installed by apt)
Abnormal: OS Ubuntu 24.04 noble-20240605(Docker), Nginx 1.24.0(installed by apt)

Configuration file

user www-data;

# Set number of worker processes automatically based on number of CPU cores.
worker_processes auto;

# Enables the use of JIT for regular expressions to speed-up their processing.
pcre_jit on;

# Configures default error logger.
error_log /var/log/nginx/1/error.log warn;

# Includes files with directives to load dynamic modules.
include /etc/nginx/modules-enabled/*.conf;

# Uncomment to include files with config snippets into the root context.
# NOTE: This will be enabled by default in Alpine 3.15.
#include /etc/nginx/conf.d/*.conf;

events {
    # The maximum number of simultaneous connections that can be opened by
    # a worker process.
    worker_connections 204800;
    use epoll;
    multi_accept on;
}

# Multi-worker live streaming
rtmp_auto_push on;

rtmp {
    server {
        listen 19350;
        chunk_size 60000;
        access_log /var/log/nginx/1/access.log;

        application broadcast {
            live on;

            hls on;
            hls_path /broadcast/1;
            hls_fragment 10s;
            hls_playlist_length 30s;
            hls_continuous on;
            hls_nested on;
            hls_base_url /broadcast/;
            drop_idle_publisher 30s;

            exec_publish /bin/bash /makeln.sh $name;
        }
    }
}

Steps to reproduce the behavior

  1. run docker container and install files
  • docker run --name edge -p1935:1935 -p8080:8080 ubuntu:noble-20240605
  • (in container) # apt update && DEBIAN_FRONTEND=noninteractive apt install -y nginx logrotate cron tzdata wget curl ffmpeg libavcodec-extra60 libavformat-extra60 libnginx-mod-rtmp
  1. nginx-http-flv-module compile and install
  2. connect many(about 300) to nginx rtmp port and monitoring

Error log if any

No error logs.

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

No branches or pull requests

1 participant