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

Angular 15 - getrlimit(RLIMIT_NOFILE): in datadog logs? #862

Open
kapil26021994 opened this issue Jan 27, 2024 · 2 comments
Open

Angular 15 - getrlimit(RLIMIT_NOFILE): in datadog logs? #862

kapil26021994 opened this issue Jan 27, 2024 · 2 comments

Comments

@kapil26021994
Copy link

kapil26021994 commented Jan 27, 2024

Describe the bug

I have deployed angular project via docker ,nginx and docker-compose.yml file but from harness pipeline CI done but CD got issue and in the CD pipeline can anybody help on that regarding below issue as well as i am sharing all my files :

To reproduce

Steps to reproduce the behaviour:

  1. Datadog error
2024/01/25 15:21:18 [notice] 1#1: start worker process 30
2024/01/25 15:21:18 [notice] 1#1: start worker process 29
2024/01/25 15:21:18 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 65535:65535
2024/01/25 15:21:18 [notice] 1#1: built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r10)
Jan 25 20:51:18.317 2024/01/25 15:21:18 [notice] 1#1: nginx/1.25.3
Jan 25 20:51:18.307  /docker-entrypoint.sh: Configuration complete; ready for start up
Jan 25 20:51:18.300   /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
Jan 25 20:51:17.78    /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
Jan 25 20:51:17.776  /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
Jan 25 20:51:17.776 /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
Jan 25 20:51:18.300  /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
  1. Docker file
FROM artifactorycloud.ual.com/v-docker/node:16 AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build --configuration=development
FROM artifactorycloud.ual.com/v-docker/nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
# Copy the nginx conf that we created to the container
COPY ./nginx.conf  /etc/nginx/conf.d/default.conf

EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
  1. docker-compose.yml:
version: '3.7'
services:
  web:
    build: 
      context: .
      dockerfile: ./Dockerfile
    ports:
      - 80:80
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
    logging:
        driver: json-file
        options:
          max-size: "10m"
          max-file: "3"
volumes:
  angularngixvolume:

  1. nginx.conf
server {
    listen 0.0.0.0:80;
    listen [::]:80;
    default_type application/octet-stream;

    gzip                    on;
    gzip_comp_level         6;
    gzip_vary               on;
    gzip_min_length         1000;
    gzip_proxied            any;
    gzip_types              text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
    gzip_buffers            16 8k;
    client_max_body_size    256M;

    root /usr/share/nginx/html;

    location / {
        try_files $uri $uri/ /index.html =404;
    }
      location /ui/health {
            access_log off;
            add_header 'Content-Type' 'text/plain';
            return 200 "Healthy\n";
        }
}
@kapil26021994 kapil26021994 changed the title Angular 15 - getrlimit(RLIMIT_NOFILE): 65535:65535 in datadog logs? Angular 15 - getrlimit(RLIMIT_NOFILE): in datadog logs? Jan 27, 2024
@TheSlimvReal
Copy link

I think we are experiencing the same issue. Setting worker_rlimit_nofile on top level results in "worker_rlimit_nofile" directive is not allowed here in /etc/nginx/conf.d/default.conf:1.

@buchdag
Copy link

buchdag commented Feb 15, 2024

getrlimit(RLIMIT_NOFILE): xxxx:xxxx is a normal message from nginx startup, not an error.

@TheSlimvReal where do you set worker_rlimit_nofile exactly ? It's only allowed in the main context, not inside events, http, server, etc.

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

3 participants