Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

media repo worker leaks open FDs #9488

Open
richvdh opened this issue Feb 24, 2021 · 7 comments · Fixed by #9497
Open

media repo worker leaks open FDs #9488

richvdh opened this issue Feb 24, 2021 · 7 comments · Fixed by #9497
Labels
S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@richvdh
Copy link
Member

richvdh commented Feb 24, 2021

There is a sawtooth on the "Open FDs" graph for the media repository: they accumulate until a Gen 2 GC happens:

image

The accumulated FDs appear to be CLOSE_WAIT sockets; they mostly appear to be outbound connections to port 80 or 443 so they are probably related to url preview requests.

@ShadowJonathan
Copy link
Contributor

This looks to me like twisted not properly explicitly closing these, is this an upstream bug?

@clokep
Copy link
Member

clokep commented Feb 24, 2021

I'd be curious if we're seeing this on a server that is not using the S3 provider, just to narrow down the potential cause.

There was also a useful comment from the previous issue: #8653 (comment)

We seem to be leaking sockets in CLOSE_WAIT:

$ lsof -n -p 54367 | grep -Eo "\(.*\)$" | sort | uniq -c
   1229 (CLOSE_WAIT)
    190 (ESTABLISHED)
      3 (LISTEN)

@clokep clokep added S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels Feb 24, 2021
@ShadowJonathan

This comment has been minimized.

@richvdh
Copy link
Member Author

richvdh commented Feb 24, 2021

given the destinations in question for those CLOSE_WAIT sockets, I'd be surprised if S3 was relevant here.

@ShadowJonathan

This comment has been minimized.

@clokep
Copy link
Member

clokep commented Mar 3, 2021

Unfortunately it seems like #9497 did not fix this. 😢 I'll need to keep investigating.

@clokep clokep reopened this Mar 3, 2021
@clokep clokep removed their assignment Mar 30, 2021
@clokep
Copy link
Member

clokep commented Mar 30, 2021

I was unable to reproduce this, so this needs a bit more investigation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants