Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Response body was not closed causing the goroutine leak #97

Merged
merged 1 commit into from
Jun 20, 2022

Conversation

myml
Copy link
Contributor

@myml myml commented Jun 17, 2022

Using webdav in juicefs server gives the error 'too many open files'

(pprof) top
Showing nodes accounting for 643, 99.69% of 645 total
Dropped 76 nodes (cum <= 3)
Showing top 10 nodes out of 46
      flat  flat%   sum%        cum   cum%
       640 99.22% 99.22%        640 99.22%  runtime.gopark
         3  0.47% 99.69%          3  0.47%  syscall.Syscall
         0     0% 99.69%         20  3.10%  bufio.(*Reader).Peek
         0     0% 99.69%         21  3.26%  bufio.(*Reader).fill
         0     0% 99.69%         20  3.10%  github.com/emersion/go-webdav.(*Client).Create.func1
         0     0% 99.69%         20  3.10%  github.com/emersion/go-webdav.(*fileWriter).Close
         0     0% 99.69%         20  3.10%  github.com/emersion/go-webdav/internal.(*Client).Do
         0     0% 99.69%         20  3.10%  github.com/juicedata/juicefs/pkg/chunk.(*cachedStore).put
         0     0% 99.69%         20  3.10%  github.com/juicedata/juicefs/pkg/chunk.(*cachedStore).put.func1
         0     0% 99.69%         20  3.10%  github.com/juicedata/juicefs/pkg/chunk.(*cachedStore).upload

Copy link
Owner

@emersion emersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks for the fix!

@emersion emersion merged commit e0764c0 into emersion:master Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants