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

/tmp/multipart-xxxxxxxxxx files don't expire #1665

Closed
netamego opened this issue Nov 2, 2022 · 4 comments · Fixed by #1678
Closed

/tmp/multipart-xxxxxxxxxx files don't expire #1665

netamego opened this issue Nov 2, 2022 · 4 comments · Fixed by #1678

Comments

@netamego
Copy link

netamego commented Nov 2, 2022

Hi,

Pyroscope generates /tmp/multipart-xxxxxxxxxx files that are not expired and can cause the /tmp filesystem to fill up.

What is the purpose of these files?. Seems that are generated when browse in pyroscope gui. Could be an option to rotate this files? for example no more than 50 files.

Thanks.

@kolesnikovae
Copy link
Collaborator

kolesnikovae commented Nov 2, 2022

Hi @netamego!

If you use Go/Java push agents, I'm afraid you might have encountered multipart size limit:
https://github.com/pyroscope-io/pyroscope/blob/04ab88a1d6c7c8fabefe5a46bf69c3137de25d06/pkg/convert/pprof/profile.go#L189-L196

Just in case: are these files owned by pyroscope user? I'm asking because /tmp/multipart-xxxxxxxxxx is the pattern that is used by the standard Go library (mime/multipart package), see golang/go#20253.

I think we have two options:

  1. Limit the request body size, to ensure these files are never created.
  2. Cleaning up files with RemoveAll.

I think we need to do the latter (despite my TODO note).

/cc @petethepig

@netamego
Copy link
Author

netamego commented Nov 4, 2022

Hi,

Yes.These multipart files are owned by pyroscope user.
Sorry but I don't understand the problem. We use pyroscope exclusively with pyroscope java agent.

These multipart files constantly fill the /tmp filesystem when we browse the flamegraphs in the gui.

Thanks.

@eh-am
Copy link
Collaborator

eh-am commented Nov 4, 2022

Hey! Just to be clear, it doesn't seem to be related to the pyroscope gui, but when ingesting big profiles.

Thanks @kolesnikovae for having a look at it!

@kolesnikovae
Copy link
Collaborator

Hi @netamego! The fix is on the way: #1678

In the meantime, before we release it you can use the PR build image: pyroscope/pyroscope-dev:git-8739907009cbd8b303b8a6569113a4c9127c164f

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 a pull request may close this issue.

3 participants