Resolve AcuShare error during heavy processing



Batch processing on a certain Linux server launches many hundreds of runcbl processes per minutes for a period of time.  During this batch processing some of the runcbl processes fail with this logged in the error file "acushare version 7.0.0 or later is not running".  AcuShare is definitely running as most of the processes succeed.


The error message indicates that the failed processes could not negotiate the handshake with the AcuShare process.  When a runcbl process ends it communicates with AcuShare and that socket is closed.  However the OS will wait 60 seconds before it releases that socket to be reused.  In this case there were so many connections/disconnections per minute that the system ran out of sockets for AcuShare to communicate.  Those processes attempting to start during this period received the message about AcuShare not running.

There is a kernel parameter, tcp_tw_reuse, which causes the sockets to be reused immediately.  Check this parameter by executing:

sysctl net.ipv4.tcp_tw_reuse

Turn it on by executing

sysctl -w net.ipv4.tcp_tw_reuse=1

 The sockets will now be available for reuse immediately and all of the AcuShare handshakes will succeed.

Comment List