nginx error log shows "Too many open files"

Solution Verified - Updated -

Issue

  • under certain load conditions following message could be seen in nginx's error log file: "Too many open files"
  • what are the best practices in settings limit for nginx
  • [crit] 3349415#0: accept4() failed (24: Too many open files)
  • [alert] 3349415#0: *670683 socket() failed (24: Too many open files) while connecting to upstream, client: x.x.x.x, server: abc.redhat.com,

Environment

  • Red Hat Enterprise Linux 8/9
  • nginx web server 1.18/120

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content