NeedsFixOS-Windowshelp wanted
Repository metrics
- Stars
- (133,883 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
Linux
What did you do?
One of our servers ran out of file handles (/proc/sys/fs/file-max). This led net.Listener.Accept() to return ENFILE (not EMFILE). Since ENFILE is not considered a temporary error, http.Server.Serve exited it's accept loop and returned ENFILE.
What did you expect to see?
ENFILE should be treated as temporary if returned by accept (and possible others). http.Server should not abort its accept loop when encountering ENFILE.
What did you see instead?
The application which received ENFILE logged the error, and continued running without a working listener / http server. If the application had followed the common log.Fatalln(http.Serve(...)) it would have crashed.