Atk panel opens too much connections?

I've posted this on github, and didn't find any solution yet, so will repeat it here.

Environment: Tangobox 9.3.
Actions:

Connect to TangoTest server with atkpanel: atkpanel sys/tg_test/1
Check connections of TangoTest: lsof | grep TangoTest | grep ESTABLISHED
Or lsof | grep TangoTest | grep ESTABLISHED -c - gives number of lines found.
Result:
Number of open connections grows.
After few days it reaches limit of open files and user cannot connect to tg_test.
If close atkpanel, lsof | grep TangoTest | grep ESTABLISHED -c returns 0.

Same issue on my custom device server leads to the situation when server cannot open TCP connection to hardware and vice verca, paralyzing operation of the system. smile

Actually, I think that the issue may be in jive, because closing jive removes all extra connections.
Edited 3 years ago
Hi,

I think the feature implemented in this jive commit will be interesting for you: https://github.com/tango-controls/jive/commit/0b05485a771755f18f48083f582d53d70ef062fb

When you use this option (java -DATKPANEL=path_to_special_atkpanel_startup_script in jive startup script), I think it will launch atkpanel from jive in a separate process, so separate JVM.

This option is not used in jive startup script from TangoBox 9.3.

We are using this option in our control system at the ESRF to avoid the problems which can happen when you start atkpanel in the same JVM as jive. Especially when you have many devices and start many atkpanel instances on many different devices.
When you close these atkpanel instances, the connections remain active until you close jive if you don't use the -DATKPANEL option I think).
The problem you reported is one of the problems that can happen when you don't use this -DATKPANEL option.
We should probably use this option in the next TangoBox version.

I guess Jean-Luc Pons could give you more information on that topic.
Jean-Luc, please correct all the mistakes I am writing here.

As far as I can tell, I think you would need to make a special atkpanel startup script (named /usr/local/bin/atkpanel-jive for instance) similar to the /usr/local/bin/atkpanel one and I think you would need to change the last lines of the scripts with:


/usr/bin/java \
-mx128m \
-DTANGO_HOST=$1 \
-Dlogback.configurationFile="$LOGBACK" \
atkpanel.MainPanel \
$2


Then in jive Startup script, you can change the java invocation lines with the following lines:


/usr/bin/java \
-mx128m \
-DTANGO_HOST=$TANGO_HOST \
-Dlogback.configurationFile="$LOGBACK" \
-DATKPANEL="/usr/local/bin/atkpanel-jive" \
$applet_name $@


Hoping this helps a bit.
Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
 
Register or login to create to post a reply.