Too many open websocket connections

djuka

Member
The rest api stops responding and when I checked the stats parameter 'connections_websocket' displayed 90 and 'streams_webrtc_in' was 0.
After I restarted webcall server it was fine.
Should I set some parameter to enable connection close when there is no stream in?
 

Max

Administrator
Staff member
Hello

If REST API stops responding

1. Make sure jstack works.

jstack PID > PID.txt

Here PID is ID of server process, i.e. 10532

2. Create report with the --jstack key

Code:
sudo /usr/local/FlashphonerWebCallServer/tools/report.sh --sysinfo --conf --jstack --tar
3. Send report via form or to email support@flashphoner.com

We will analyze logs for a cause of API non-responding.

Regarding connection close.
We don't have server-side settings to close connection if no active streams.
However you can close websocket connection if associated stream was stopped or failed.
90 connections is not a high load. Should not consume many resources. Need logs to find root cause.
 

djuka

Member
root@mediaserver:~# sudo /usr/local/FlashphonerWebCallServer/tools/report.sh --sysinfo --conf --jstack --tar
Usage: report.sh [OPTIONS]
Default report will include netstat, lsof, logs between now and 3 hours ago, pmap, jstack
--conf copy configuration
--dump make heap dump
--sysinfo gather system info
--stats gather WCS statistics
--tar tar report
--hours <hours> hours count to collect lates logs (3 by default)
--help help
 

djuka

Member
now it happens again. WCS not working and connections_websocket = 12 and streams_webrtc_in = 0
I can not take report since there is no key --jstack
 

Max

Administrator
Staff member
jstack can be created manually. It is just a plain text file
jstack 10634 > 10634.txt
Here 10634 is example of server process PID
Therefore we would need the report without jstack key and file 10634.txt
 

Max

Administrator
Staff member
Sorry for inconvinience.
There is no command line key --jstack because report.sh script collects jstack dump in any conditions. So you can call it like
Code:
sudo /usr/local/FlashphonerWebCallServer/tools/report.sh --sysinfo --conf --tar
then send us the report archive
 

djuka

Member
I rolled back Flashphoner from the latest version to 1843 and all works fine. The latest version works very unstable and have issues.
 

Max

Administrator
Staff member
Hello

We issued internal ticket WCS-4061 for load tests and investigation of reported issue.

Please send us a report
sudo /usr/local/FlashphonerWebCallServer/tools/report.sh --sysinfo --conf --tar
And zip server_logs/flashphoner.log and other hourly rotated logs related latest version.
Based on this logs we will reconstruct your case in our environment and report about our results.
At least we would need flashphoner.properties config and wcs-core.properties config to see configuration.
 

djuka

Member
1708873770371.png

again I had sudden CPU overload and after that rest-api not respond.
I will send you report.
 
Top