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
[HttpClient] Add option to disable debug buffer in CurlResponse #35975
Comments
What makes you think this is related to the debug buffer? |
Hello, Don't know if this is related but we have the same memory error with HttpClient :
We tried to disable the buffer with This memory error occurs only on the first call, next calls are OK. |
Does the error disappear if you comment the line |
Yes, I tried in my local environment with a lower |
OK thanks. Can you now uncomment the line again, and comment the next one? This will print the debug log to stderr, so you'll be able to "see" what's there. |
BTW, how many concurrent requests do you have? That might play a role also. |
Summary: the debug log is full of
and memory explodes when |
@nicolas-grekas I've changed
NativeHttpClient works without errors for a week now. As far as I know native client don't have debug buffer so it seems to me like it can be the cause. |
@piotrekkr and @adrienfr can you please confirm #36038 fixes your issue? |
Seems good to me! With your patch, debug file size is similar between each request. |
@nicolas-grekas I get logs with many lines like:
Your patch works and debug info size is quite low and similar between requests.
Bug reports here: https://curl.haxx.se/mail/lib-2019-02/0053.html |
@nicolas-grekas @adrienfr Thanks for helping me out and finding what is the real problem. I still think that option for disabling verbose debug info would be nice to have :) |
Thanks for the confirmation. This means my PR is fixing your issue too, isn't it? |
@nicolas-grekas Yes your PR resolves my problem, great work. Thanks. Should I close this issue or it will be closed when PR is merged? |
Which exact version of curl do you have @piotrekkr @adrienfr? Only 7.64.0 is affected apparently? |
|
OK, so that kinda confirms the point. I'm mixed then: better do nothing here and let you upgrade curl instead, isn't it? Adding code for one specific version is quite a high maintenance cost to pay here... |
Same here:
It is newest version curl available on debian 10. I quickly searched google how to upgrade or downgrade curl on buster but I didn't found anything usefull. It seems that solution would be using eaarlier docker image with php 7.3 and debian stretch:
I'll test if this fix verbose logs |
Yeah downgrading |
Nice, thanks for the investigation. I updated the PR to just disable the debug log on curl 7.64.0. |
Ok, I'm closing this issue. My request has no meaning since it was caused by bug in |
…rekas) This PR was merged into the 4.4 branch. Discussion ---------- [HttpClient] disable debug log with curl 7.64.0 | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #35975 | License | MIT | Doc PR | - Works around https://curl.haxx.se/mail/archive-2019-02/0013.html Commits ------- d4cde31 [HttpClient] disable debug log with curl 7.64.0
Description
I'm in need for an option to disable usage of debug buffer in
CurlResponse
.CurlResponse::getInfo()
loads debug buffer to memory. Exceptions usingHttpExceptionTrait
triggers this method and sometimes this triggers memory size error:It is hard to debug actual reason of this since this is happening from time to time and on production server only. I don't need this debug information at all. Just HTTP status code would be enough and some response content. How can I disable this?
The text was updated successfully, but these errors were encountered: