Increase number of worker_connections on Beanstalk nodejs environment

Viewed 696

I am trying to increase the number of possible worker_connections of my nginx on my Beanstalk nodejs server.
I followed the documentation and created a proxy.config file in my .ebextensions folder at the root of my project.

files:
  /etc/nginx/conf.d/proxy.conf:
    mode: "000644"
    owner: root
    group: root
    content: |

      worker_rlimit_nofile 65536;
      events {
        worker_connections  50000;
      }

I re-deployed my project but still get this error [alert] 19144#0: 1024 worker_connections are not enough.

EDIT: I was looking at the documentation for Amazon Linux 1, so here is my new problem: Increasing worker_connections of nginx on Beanstalk nodejs environment

1 Answers

/etc/nginx/conf.d/proxy.conf is for Amazon Linux 1.

Since you are using Amazon Linux 2 you should be using .platform/nginx/conf.d/ as shown in the docs, to customize nginx.

Therefore, you could have the following .platform/nginx/conf.d/myconfig.conf with content:

worker_rlimit_nofile 65536;
events {
  worker_connections  50000;
}
Related