-
Notifications
You must be signed in to change notification settings - Fork 34
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
IBX-3863: Parametrized Solr HTTP Client timeout and max retries #241
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semantic bundle configuration is almost always preferred and recommended by Symfony.
5c77089
to
dda3dda
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you can additionally do is to pass additional options to ibexa.solr.http_client
factory.
What I mean specifically, we can pass extra.curl.CURLOPT_CONNECTTIMEOUT
(extra
contains client-specific configurations) so that if we are having trouble establishing a connection, then we're dropping the attempt earlier (like after 2 seconds maybe?).
This will help us differentiate between service being overloaded / responding longer vs. service being completely unavailable.
See https://symfony.com/doc/current/http_client.html#configuring-curlhttpclient-options
@Steveb-p I got the error when trying to set that option
Moreover I think it will be the opposite of what we're trying to achieve. We need to extend connecting time in case of slow solr instance, but we want to avoid retries when instance is not running at all. |
bundle/DependencyInjection/EzSystemsEzPlatformSolrSearchEngineExtension.php
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA approved on IbexaDXP 3.3 commerce.
v3.3
+When switching to Symfony HTTP Client to handle Solr queries in #235. I didn't introduce any possibility to configure Client's timeout nor number of max retries. There are some edge cases which show that this parameter might work-around performance issues.
Documentation
SolrIbexa Solr Bundle uses Symfony HTTP Client to fetch and update Solr index. It's possible to configure timeout and number of max retries for that client using Solr Bundle's Semantic Configuration:v3.3:
v4.x:
QA
You can test timeout change by mocking Solr service
and then trying to perform e.g. reindexing
See that modifying both
timeout
andmax_retries
affect the wait time and the amount of tries before failure.Open questions
Given this rather should be avoided, preferring proper performance fixes, should we:
Checklist: