Getting Data In

HTTP event collector client AJAX error "readyState 0, status 0, statusText error"

cafissimo
Communicator

Hello,
while trying to send messages to Splunk HTTP event collector through javascript inside a web page, I sometimes get this erro:

readyState 0, status 0, statusText error

It seems, but I am not sure, that this error is related to the volume of HTTP POSTS that are concurrently made.
Is there any kind of limit to HTTP POSTS that a single HEC is able to handle at a time?
If yes, what is this limit? I cannot find a sizing guide for HECV, other than what is suggested in this page " http://dev.splunk.com/view/event-collector/SP-CAAAE73 ", but there are no clues about volumes.

Thanks in advance.

0 Karma

logloganathan
Motivator

You can override this automatic configuration by making changes to server.conf. Increasing the number of threads can increase the amount of memory that the Splunk Enterprise instance uses.

In the $SPLUNK_HOME\etc\system\local, create or edit server.conf.
In the [httpServer] stanza, set the maxThreads attribute to specify the number of threads for REST HTTP operations that Splunk Enterprise should use.
Set the maxSockets attribute to specify the number of sockets that should be available for REST HTTP operations.
Save the file.
Restart Splunk Enterprise. The changes should take effect immediately

Please find the default value
maxThreads=100000
maxSockets=50000

0 Karma

Anam
Community Manager
Community Manager

Hi logloganathan

This is an exact copy of the Splunk Documentation: https://docs.splunk.com/Documentation/Splunk/7.0.2/Troubleshooting/HTTPthreadlimitissues
You cannot copy answers from Splunk Documentation and post them as your own, that is plagiarism.

0 Karma

logloganathan
Motivator

Hi asiddique,
user don't know about the document so copied and posted here.
Any suggestion will be helpful for posting these kind of things in future.
Please provide the guidelines

0 Karma

Elsurion
Communicator

Well you should add your source to the copied section, then it would not be a problem.
This has to do with the respect of the original writer...

http://www.uticaod.com/x1177024386/Internet-Etiquette-10-Rules-of-Netiquette
Rule 2

logloganathan
Motivator

sure got it

0 Karma

livehybrid
Builder

Are you getting this error after executing an AJAX request from a click or keystroke action?
If so, are you doing a return false or e.preventDefault(); (Where e is your event).

function onClick(sender, e) {
  e.preventDefault();
  $.ajax({
    type: 'POST',
    url: 'http://yoursplunk.com:8088'
  });
}
0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...