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

[Improvement] Use different cURL option to prevent OOM error in collector #72

Open
ejweber opened this issue May 24, 2023 · 2 comments
Open

Comments

@ejweber
Copy link
Contributor

ejweber commented May 24, 2023

A Longhorn user in longhorn/longhorn#5985 noticed that the support bundle collection process could not complete on resource constrained hardware (Raspberry Pi 4s). They found the following in the support bundle agent logs:

+ curl -v -i -H 'Content-Type: application/zip' --data-binary @node_bundle.zip http://10.244.4.60:8080/nodes/w1
curl: option --data-binary: out of memory
curl: try 'curl --help' or 'curl --manual' for more information

This seems to be a known issue with the cURL --data-binary flag. The entire contents of a file are loaded into RAM before the file is sent. A number of (admittedly old) GitHub and StackOverflow issues mention using the -T(--upload-file) option as an alternative.

If it is possible, we should consider using the -T(--upload-file) option to ensure bundles upload successfully even when memory is limited.

curl/curl#1385
curl/curl#290
https://stackoverflow.com/a/69788901

@ejweber
Copy link
Contributor Author

ejweber commented May 25, 2023

The user posted an update showing that approximately 7 GB of syslog files were collected to be sent during the failure. Maybe instead (or in addition) we should limit the size of the files we are sending?

longhorn/longhorn#5985 (comment)

@samip5
Copy link

samip5 commented Dec 26, 2023

I would also like to point out that sometimes those log files can be 10GB+, in my new case, 20GB for syslog and messages logs...

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

No branches or pull requests

2 participants