-
Notifications
You must be signed in to change notification settings - Fork 56
Mutable HttpConfiguration Headers ? #231
Comments
Sorry you've been running into this difficulty. I'll do my best to respond from the point of view of an SDK maintainer— although it's possible that it will be hard to diagnose what's going on without more access to the details of your environment and knowledge of what's in the scripts you are running, in which case it might be best to take it to a support ticket through There are a few things I'm unclear on here:
|
To more directly answer the question that's in the issue title: it'd be reasonable and pretty straightforward for us to add a "put this specific header into all of the SDK's HTTP requests" method to |
@eli-darkly -- thank you for the detailed responses, and sorry again for probably not looking at the problem from the right angles. We did turn out to have an issue in which our central executor, responsible for invoking our scripts, did possess a race case that prevented This ultimately makes my initial blurb a moot point; I'll close this issue. Thank you for all of the information in your first post's second point -- it's helpful to get that insight into SDK behavior in certain response scenarios. Apologies again for conflating the issue board here, and thanks for the replies. |
No worries—glad to hear it worked out! |
…e-url make events URI construction reliable regardless of whether base URI ends in a slash
Hey! I'm @steebe from Mercato
Is your feature request related to a problem? Please describe.
Background
We're operating within a monolith, that shares quite a few resources between our application server code and a collection of scripts. The scripts in question are simple JVM processes that are cronned to do various tasks. When the following occurs, it keeps the respective script from exiting successfully. On a few occasions, we have been experiencing script hangs due to underlying HTTP Connection behavior in the LaunchDarkly Java SDK.
There is an old issue ( #93 ) that directly relates to this. It seems to have bounced around for a while here before being closed due to it not being at all trivial to address. Regardless, I think it's important to note that it's not strictly limited to Tomcat behavior.
After looking into things, I think what's happening is that LD treats each of its HTTP calls (performed via
okhttp3
libraries) as streams with no explicit close behavior enforced at the connection level, other than a timeout. It looks like the stream is interrupted at a specific point, or experiences a certain state while it's being interrupted, it hangs with constant attempts to reconnect to the server it established the stream with.Obviously, I'm still a bit naïve to the specific chain of events that is causing our specific issue, but a combination of this underlying streaming behavior and the way that our JVM processes' runtime exit is resulting in the above intermittently.
Notes
Describe the solution you'd like
I suppose I'm looking for either confirmation of my suspicions in (1) + (2) above, and/or acknowledgement that there are no intentions on changing the Java SDK's capability to provide additional headers beyond the currently immutable defaults would suffice 😄
In that case, we will just expect to keep LD out of our scripts area for the foreseeable future.
Describe alternatives you've considered
As mentioned above:
Additional context
Apologies if I've provided incorrect context about the
okhttp3
behavior, or if I've overlooked any mechanisms provided for mitigating this behavior thru the SDKs themselves (outside of cloning & publishing entirely new versions of them).The text was updated successfully, but these errors were encountered: