-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[ElasticsearchLogstashHandler] There seems to be an issue with the version 5.3.11 of http-client ? #44334
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
Comments
Thanks for the reproducer! |
Well, I'm on it. I made an update (not pushed on my repo yet) but the issue does not happen anymore (I did This is really weird ... I will try to push my tests further... Regarding your error, do you see those messages (especially the "Idle Timeout" one) like on this picture: If yes, the issue also occurs to you, even if the setup is not working as expected: since the driver is not found, a warning/error message is triggered and pushed to the ES stack. edit: have you done the |
I reproduced the issue, without the database. You can clone https://github.com/adaniloff/symfony-http-client-issue/blob/feat/only-the-cmd/README.md (another branch of the same repo). First: clean your containers with Then do the following:
The last cmd should / may be ran multiple times before the issue happens. If it the issue does not occur, try a cache clear and re-exec the command. edit: I've updated the README.md on the repo itself for further explanations edit2: the issue seems to appear 'randomly'. It cleary seems related to the time taken to push the logs into the ES stack. In the
|
Hi, any news on this issue ? |
Hi! I'd like to notice, that the same problem appears in my project, but I'm using |
@m-wisniewski you can try to |
@adaniloff Actually I've disabled sending debug level logs to elasticsearch handler. I still have those saved to file and kinda don't need it for now, since I'm working on the project locally and have xdebug. Nonetheless, thanks a lot for your advice! |
Thanks for the reproducer, that allowed me to focus on finding a fix (which took me a few hours and will lead to a few more hours to try removing a circular loop I found meanwhile) See #44601 Dropping https://github.com/sponsors/nicolas-grekas/ here just in case ;) |
…struct (nicolas-grekas) This PR was merged into the 4.4 branch. Discussion ---------- [HttpClient] Fix closing curl-multi handle too early on destruct | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #44334 | License | MIT | Doc PR | - For some reason, the garbage collector can decide to destruct the `CurlClientState` before the responses that reference them. When this happens, the curl-multi handle is closed and responses end up in a broken state. This fixes it by not closing the multi-handle on destruct/reset. This also fixes configuring the multi-handle on reset. Commits ------- c0602fd [HttpClient] Fix closing curl-multi handle too early on destruct
Thanks @nicolas-grekas for the fix. By the way great job at the Symfony Live 👍 |
Sorry to repost but we're still having the issue. Has the fix been deployed ? Could we have more visibility (since this bug ticket is now closed, I don't really know where I can get the info) about that ? I'm not trying to push you to do things or anything, I just would like to know if I misundertood something since the only merge request that I can see is on 4.4 ? Thanks a lot for your time |
The bugfix has been merged to all maintained branches, but did not ship in a stable release yet. Does that answer your question? |
Yes this does ; thanks to the both of you for your patience. Bonnes fêtes de fin d'année 🎅 🎁 ! |
Symfony version(s) affected
5.3.11
Description
Hello there ; we recently upgrade from
5.2.12
to5.3.11
.I'm not really sure what's happening... but logging in ES with
curl
+ElasticsearchLogstashHandler
is now causing some trouble.Our usecase
In our case, while running
doctrine:fixture:load --append
, some (info level) logs are generated. However, we now got an error related to thehttp-client
package (because of those logs).Our investigation
The issue seems to happen when the stack tries to push logs through the
curl
+ElasticsearchLogstashHandler
package inmonolog-bridge
+http-client
.The error is introduced because of / thanks to symfony/http-client@cf34137, but I doubt this commit is the real issue.
Sometimes, we even get the following error:
I made a repository https://github.com/adaniloff/symfony-http-client-issue/blob/main/README.md with a docker stack to reproduce, since the case is not easy to setup (... it requires a specific version of SF5 + ES + POSTing logs to ES...).
How to reproduce
Reproducing the issue requires:
See https://github.com/adaniloff/symfony-http-client-issue/blob/main/README.md for an easy setup (requires docker/docker-compose).
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: