As per Splunk documentation to have unlimited threads and sockets we should change maxThreads and maxSockets parameters in server.conf to negative number. I changed these parameters to -1 and restarted splunk, however still I could find below errors in logs.
WARN HttpListener - Socket error from 127.0.0.1 while accessing /servicesNS/nobody/SAP_Dashboard/data/inputs/rest/restapiname/: Broken pipe