[play] get open connection count

100 views
Skip to first unread message

k1nga...@gmail.com

unread,
Oct 4, 2016, 11:00:54 AM10/4/16
to Play Framework
Hi guys,

im running a Java web application based on Playframework 2.5.4 and Apache Webserver.

In some cases (e.g. software patching processes) i need to stop the running application. For this i must be shure, that no open connections are currently available (no users are using the plattform).

Is there an elegant (build-in) way to get the count of all currently opened connections in Play or on the Apache Server ? It would be nice the print the count of opened connections on a view on the application platform.


Best regards.

Igmar Palsenberg

unread,
Oct 6, 2016, 9:19:46 AM10/6/16
to Play Framework
 
im running a Java web application based on Playframework 2.5.4 and Apache Webserver.

In some cases (e.g. software patching processes) i need to stop the running application. For this i must be shure, that no open connections are currently available (no users are using the plattform).

Is there an elegant (build-in) way to get the count of all currently opened connections in Play or on the Apache Server ? It would be nice the print the count of opened connections on a view on the application platform.

Apache has server-status, which lists the number of active connections per child. You however still need to parse that. I can't remember if it support multiple formats.
On the Play side : I doubt it. Play is pretty much stateless, and I don't thing it provides this. You might ask the OS (/proc/pid/fd), but you also need to parse that (not every FD is a socket).

Either way isn't elegant, nor portable.

Igmar 
 

k1nga...@gmail.com

unread,
Oct 20, 2016, 4:27:20 PM10/20/16
to Play Framework
Thanks for your answer. I'll check the Apache server-status feature.

Regarding the Play side:

where is described how to get a list of active clients with the Akka Actor Feature in Play and WebSockets.
Maybe this is also a possible solution for me on the play side. I'll go deeper into this Akka topic.

Or has anyone some experience with this topic and could tell me, if this is a usefull solution for my problem ?
Reply all
Reply to author
Forward
0 new messages