KB Article #67538
bind() system call failed: No buffer space available
-- bind() system call failed: No buffer space available when processing a high load
Resolution
Cause : occurs when there is no more socket available on the Windows system
1. monitor the netstat results while the load test is being performed
netstat - an 30 > netstat.out
it will create a file listing the netstat result every 30 seconds
2. check the file and verify that most of the TIME_WAIT socket are used by b2bipmserver (default port is 8878) and that the limit 65535 is reached :
ex :
...
...
TCP 127.0.0.1:65527 127.0.0.1:8878 TIME_WAIT
TCP 127.0.0.1:65528 127.0.0.1:8878 TIME_WAIT
TCP 127.0.0.1:65530 127.0.0.1:8878 TIME_WAIT
TCP 127.0.0.1:65531 127.0.0.1:8878 TIME_WAIT
TCP 127.0.0.1:65532 127.0.0.1:8878 TIME_WAIT
TCP 127.0.0.1:65533 127.0.0.1:8878 TIME_WAIT
TCP 127.0.0.1:65534 127.0.0.1:8878 TIME_WAIT
TCP 127.0.0.1:65535 127.0.0.1:8878 TIME_WAIT
3. now we are sure of the problem : pmserver is taking too many sockets
4. there are 2 possible solutions :
4.1- Change the Windows registry setting to decrease the TcpTimedWaitDelay time from 256 -> 60 (in second). such parameter defines the time before the port wil be available again. decresing such value (min valu is 30) free the socket quicker. cautious : it affects the whole windows system, be sure that the administrator is aware of it !
4.2 Change the B2BI_PMAPI_MAX_CONNECTIONS environment variable from 2 -> 9. this environment variable has to be set in environment.dat, and it defines
The value determines how many connections that stays open (is re-used) when a client connects to the PM-server. The default value is 2 on B2Bi 1.4