I don't think the problem is necessarily with asyn. The problem may be with StreamDevice, which appears to do its own connection management.
As far as I can follow the flow in stream device:
lockRequest will queue a request with asynQueuePriorityConnect if it finds the port is disconnected
That results in a call to lockHander, which in turns calls connectToAsynPort
connectToAsynPort queries whether the port is connected, and if not it calls pasynCommon->connect, which does the actual IP connection attempt.
So each time lockRequest is called, which I think is for each streamDevice I/O operation, it can result in a connection attempt.
Mark
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Scott Baily
Sent: Thursday, August 22, 2013 4:34 PM
To: [email protected]
Subject: Asyn AutoConnect and stream device on a soft IOC
We've been running a soft IOC that talked to a number of ethernet based
devices. We've been using the auto-reconnect feature of asyn, and
generally it works. However we often have problems where a device is
unreachable on the network, and apparently asyn will try to reconnect to
it many times in rapid succession, the end result is that the load on
one cpu core will reach 100%. At this point even if the device is
reconnected to the network the IOC will not successfully reconnect.
Has any one else had this problem, or no how to avoid it.
Probably, I could turn off autoreconnect and have a record that requests
reconnects at a specified maximum rate as needed. I'm wondering if
there's some setting that I've missed that limits how quickly asyn will
attempt to reconnect.