Repository navigation
Description
On large installations (about 1100 extensions, 55 queues, a few dozen CTI users), during office hours the CTI keeps disconnecting and reconnecting every few seconds, and the WebRTC phone of the CTI and NethLink loses its session and re-registers several times per hour. Physical phones are not affected.
Steps to reproduce
- Install NethVoice with about 1000 extensions and about 50 queues with many members (members are added as Local channels).
- Connect 20-30 users to the CTI and generate normal office traffic (incoming calls through queues, internal calls, transfers).
- Watch the CTI server logs and the browser console during the busiest hours.
Expected behavior
The CTI stays connected and the WebRTC phone keeps its session, regardless of the number of extensions and queues.
Actual behavior
The CTI server (nethcti-server) stops answering for seconds at a time. On one day of logs from an affected system:
- REST requests from the CTI wait up to 20-26 seconds (99th percentile 3-13 seconds between 12:00 and 14:00, about 0.1 seconds in the evening);
- the CTI websocket was closed and reopened about 4,800 times by about 30 connected users, with a median duration of 19 seconds: the phone island sends a ping every 5 seconds and reconnects after 3 missed answers, and every reconnection downloads again the full extension list (2,194 times in a day);
- the CTI server lost its Asterisk Manager Interface (AMI) connection 188 times (110 in a single hour) and every time it reloaded all extensions and told all clients to reload;
- the WebRTC phone lost its Janus session 537 times: the browser, busy with these reloads, answers the Janus long poll late and the session expires after 60 seconds.
error: [astproxy] Error: write ECONNRESET
at AsteriskAmi._send (.../asterisk-ami/lib/AsteriskAmi.js:148:19)
at Object.execute (.../astproxy/lib/plugins_command_13/queueDetails.js:93:14)
warn: [astproxy] asterisk socket close - had_error: true
warn: [astproxy] asterisk connected
warn: [proxy_logic_13] emit "reloaded" event
warn: [com_nethcti_ws] ws disconnected - reason: client namespace disconnect (user: alice)
Server resources were not the limit: the virtual machine had free CPU, memory and network. The limit is the single Node.js process of the CTI server, which does more work for every call event as the number of extensions, queue members and active calls grows:
- the AMI user of the CTI server has a write timeout of 100 ms, so Asterisk drops the connection as soon as the CTI server is slow for a moment, and the full reload that follows makes it slower;
- most call events (dial, bridge, hangup, extension and device state) request the full list of active channels from Asterisk;
- every extension update is serialized and sent separately to each connected client;
- the details of all queues are requested at the same time every 60 seconds.
Components
- NethVoice 1.7.8 to 1.8.6, NethVoice proxy 1.7.2 to 1.8.1
- NethVoice CTI and phone island shipped with those versions
See also
- Internal support chat (customer installation with about 1100 extensions, now dismissed)
- Phone Island: WebRTC/Janus stability issues after network changes and standby #7785
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity