Splunk Dev

TCP : No buffer space available

Srw12
Explorer

Hi,

Here is my problem. I've a java application using Spring Integration to send data to Splunk (with TCP).

inputs.conf :

[tcp://1234]
connection_host = dns
source = TracerSource
sourcetype = TracerSourceType
queueSize=1GB

spring-context.xml

...
< int-ip:tcp-connection-factory id="client"
    type="client" host="${tcp.host.name}" port="${tcp.port}" using-nio="true" using-direct-buffers="true" single-use="true" so-timeout="1000" />

< int-ip:tcp-outbound-channel-adapter 
    id="outboundClient" channel="jmsOutputChannel" connection-factory="client" />
...

Many times I've these error messages and the java application stops.

...
TcpSendingMessageHandler [ERROR] Error creating SocketWriter
java.net.SocketException: No buffer space available (maximum connections reached?): connect
    at sun.nio.ch.Net.connect(Native Method)
...
DefaultMessageListenerContainer [WARN] Execution of JMS message listener failed, and no ErrorHandler has been set.
org.springframework.integration.mapping.MessageMappingException: Failed to create connection

...

Do you have any explanation ? What is the best solution/configuration to manage many messages ? (1000 msgs/min - size of each msg : 1Ko to 10Ko)

Thanks in advance.

Tags (3)
0 Karma

ShaneNewman
Motivator

We had the same problem with Splunk itself filling up the TCP buffer. To fix, this we had to go into the process local to the machine Splunk was on and increase the memory allocation. Sadly, it didn't help a whole lot because the process is 32-bit and we could only allocate 1.5GB...

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...