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!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...