Skip to content

HttpEventCollectorSender.java does not use the timeout values that are configured. #183

@steyng

Description

@steyng

HttpEventCollectorSender.java does not use the timeout values that are configured.

https://github.com/splunk/splunk-library-javalogging/blob/main/src/main/java/com/splunk/logging/HttpEventCollectorSender.java

The Appender may now be configured to make use of timeout values for connection, read and write. Unfortunately, I cannot see where these values are being used in the code to configure the OkHttpClient and changing these values does not appear to make any difference to operation of the client.

I would have expected to see something like the OkHttpClient.Builder connectionTimeout, readTimeout and writeTimeout methods being called to do the config. (https://square.github.io/okhttp/3.x/okhttp/)

Version of this project you're using: 1.9.0
Platform version: Windows 10
Framework version: Adopt OpenJDK 8.0.292.10
Splunk version: 8.0.5
Running test application locally sending data to a Splunk collector.

Similarly to #162, we can end up with a large amount of memory being used if these cannot be tuned.

Example:

  1. Configure the SplunkHttp appender url = https://localhost:8088 (does not exist)
  2. Have the test application log a number of messages, e.g. 10000.
  3. Using something like VisualVM heap dumps you can see that there are a lot of live objects for HttpEventCollectorEventInfo.
  4. Without the ability to tune to cope with the Splunk collector not being available, there is a potential to end up with an OOM problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions