too many open files in mgo go server

前端 未结 2 820
一向
一向 2020-12-06 15:19

I\'m getting these errors in the logs:

Accept error: accept tcp [::]:80: accept4: too many open files;

for a mongodb server on u

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-06 15:48

    You are missing:

    defer r.Body.Close()
    

    Make sure it is used before return statement.

提交回复
热议问题