Skip to content

net/http: server Accept error: accept tcp ... too may open files #3167

Closed
@gopherbot

Description

@gopherbot

by pcrosby:

Running on weekly from 2/22/2012, getting the following errors on standard net/http
servers:

2012/03/01 18:27:09 http: Accept error: accept tcp [::]:80: too many open files;
retrying in 5ms
2012/03/01 18:27:09 http: Accept error: accept tcp [::]:80: too many open files;
retrying in 10ms
2012/03/01 18:27:09 http: Accept error: accept tcp [::]:80: too many open files;
retrying in 20ms
2012/03/01 18:27:09 http: Accept error: accept tcp [::]:80: too many open files;
retrying in 40ms
2012/03/01 18:27:09 http: Accept error: accept tcp [::]:80: too many open files;
retrying in 80ms

output of ulimit -a:

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 20
file size               (blocks, -f) unlimited
pending signals                 (-i) 16382
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 70000
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

And sysctl values:

fs.file-nr = 608    0   70000
fs.file-max = 70000

As root, number of open files (lsof | wc -l):  983

This happens consistently on a live site.  Whenever it happens, the number of open files
is way less than the max of 70000.

Which compiler are you using (5g, 6g, 8g, gccgo)?

8g

Which operating system are you using?

Linux 2.6.38-13-virtual #53-Ubuntu SMP Mon Nov 28 19:59:56 UTC 2011 i686 i686 i386
GNU/Linux
(32 bit)

Which revision are you using?  (hg identify)

96bd78e7d35e+ weekly/weekly.2012-02-22

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions