EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Asyn AutoConnect and stream device on a soft IOC
From: Mark Rivers <[email protected]>
To: Dirk Zimoch <[email protected]>, "[email protected]" <[email protected]>
Date: Fri, 23 Aug 2013 15:14:54 +0000
Hi Dirk,

I think that it would be better if streamDevice did not do connection management at all.  If the user has configured the port with autoconnect=1 then asyn should handle the connection management fine.  If the user has set autoconnect=0, then presumably they have done that for a reason.  If streamDevice connects when autoconnect=0 it is doing something the user has asked not to be done.

If I understand correctly, in connectToAsynPort you are attempting to connect if the port is disconnected, even if autoconnect=0.

Mark

________________________________________
From: [email protected] [[email protected]] on behalf of Dirk Zimoch [[email protected]]
Sent: Friday, August 23, 2013 2:58 AM
To: [email protected]
Subject: Re: Asyn AutoConnect  and stream device on a soft IOC

I suspect that the reason is that many records fail talking to the
device in short time. Each one finds the device disconnected, tries to
connect and fails.

Mark, Should I better not call connect() when the device has
auto-connect on?

Dirk

On 23.08.2013 00:35, Mark Rivers wrote:
> 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.



References:
Asyn AutoConnect and stream device on a soft IOC Scott Baily
RE: Asyn AutoConnect and stream device on a soft IOC Mark Rivers
Re: Asyn AutoConnect and stream device on a soft IOC Dirk Zimoch

Navigate by Date:
Prev: Re: streamdevice to find the last match Dirk Zimoch
Next: mrfioc2 release 2.0.2 Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Asyn AutoConnect and stream device on a soft IOC Dirk Zimoch
Next: mrfioc2 release 2.0.2 Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·