Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N
areon wrote:--disable-background-timer-throttling flag was removed from Chrome version 78.0.3904.70.
Do you have any idea how to prevent throttling in background tabs?
Thank you.
IgorG wrote:We have the same issue, Chrome forced throttling in all cases. That cause Vicidial agents goes to DEAD status frequently. Is there any recommended browsers of tips that would make vicidial agent interface usage stable?
Is there any roadmap to use websockets in agent interface operation?
bbakirtas wrote:a little suggestion
im using phpdesktop (php 5.5) for agents
https://github.com/cztomczak/phpdesktop
"Introduction
PHP Desktop is an open source project founded by Czarek Tomczak in 2012 to provide a way for developing native desktop GUI applications using web technologies such as PHP, HTML5, JavaScript and SQLite. Think of it as Electron for PHP. It is a convienient tool for converting PHP web apps and PHP CLI tools to desktop applications with little effort. The development workflow you are used to while creating web applications remains the same, there is no new framework / API to learn. The process of turning an existing website into a desktop application is basically a matter of copying it to the "phpdesktop/www/" directory."
mflorell wrote:What you are saying appears to be true in our testing, but Google could change that behavior in the next build, so who knows what the future may hold.
carpenox wrote:mjohn,
I am going to guess you do not use WebRTC phones then?
mjohn425 wrote:@martinch
Definitely please post your code here regarding the chrome extension if you are up to it (a github would probably be best), would love to do some testing. We have multiple commercial call centres but we also have our own call centre for sales based activities so we can do testing and improve for the rest of our customers without it being too interrupting to normal flow. I too am concerned regarding the goalposts, my feeling is that the vibe of the initial article I posted is that the dev who posted it is full of "well here's a better way to do it and you should be doing it this way otherwise we will make it harder in the name of performance" without realising that there a whole bunch of open source and self funded projects which can't implement these changes overnight without the backing of AlphabetTM.
One thing which I think I initially misattributed to intensive throttling when I made my first post is that I actually think that the chrome flags (chrome://flags) disable intensive throttling does work. When I view agent screen debugs for these, I can see clear 1 minute gaps in the log which disappear when I disable that flag. (Note there is a semi okay way to automate this through a batch script, it's a damn pain though). Though I still seem to get occasional lagged across the agents, their only crime, moving to a separate tab. I'm not certain whether this falls under the first category listed in the article or it is attributed to some other reason but it's definitely strange. Firefox just about halves/quarters this issue. I'm looking for a solution to avoid having to tell our customers "sorry firefox only" because that would annoy me, let alone clients. In transparency, we are running vici in an iframe as described in http://vicidial.org/docs/CRM_EXAMPLE_SKIN.txt for our customers, we also hit the api/db with about twice as many hits as usual (to keep our app responsive to state without modification to vicidial base code/cross origin issues), the DB/Web should be more than capable of handling the load but I'm concerned that the delay is coming from the client side especially since Firefox seems to perform about twice as well as chrome. Obviously that isn't in the scope of the forum to figure out but I feel it's definitely linked.
Looking at moving to WebRTC shortly through a custom SIP phone and I see that being a bit more of a permanent solution than playing sounds as it would be really difficult to limit timers while RTC is in use.
@mflorell (or others)
For my information, what would be an expected number of lagged agent records a day for say 100 agents (should it be zero, 5 -10?)
all_refresh
var counter = 1;
var vicidial = 30;
// Initialise refresh interval
var refresh_interval = 1000;
// Call web worker logic
chromeKeepAlive();
/*
* Function name: chromeKeepAlive
* Function description: this function will create a web worker that will keep the ViCiDial heartbeat going in a different execution thread
* even if the Chrome tab becomes inactive
* Date: 21/03/21
*/
function chromeKeepAlive() {
// Create new worker object
function createWorker(main) {
// New blob
var blob = new Blob(
["(" + main.toString() + ")(self)"],
{ type: "text/javascript" }
);
// Return object
return new Worker(window.URL.createObjectURL(blob));
}
// Create worker
var worker = createWorker(function(self) {
// Initialise refresh interval
var refresh_interval = 1000;
// Intialise counter
var counter = 0;
setInterval(function() {
// Increment counter
counter++;
self.postMessage(counter);
}, refresh_interval);
});
// Listen for messages
worker.onmessage = function(e) {
// Main ViCiDial heartbeat
setTimeout(function() {
all_refresh(e.data);
}, 1000);
}
}
// All refresh function call
function all_refresh(counter) {
console.log(counter);
console.log(vicidial);
}
10.171.60.170 - - [24/Mar/2021:13:25:22 +0200] "POST /agc/conf_exten_check.php?usr=6969&Dte=2021-03-24%2013:24:22 HTTP/1.1" 200 342 T:19479 KA:0+ 5192 "http://10.171.80.10/agc/vicidial3.php" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36"
10.171.60.170 - - [24/Mar/2021:13:26:22 +0200] "POST /agc/conf_exten_check.php?usr=6969&Dte=2021-03-24%2013:25:22 HTTP/1.1" 200 308 T:17695 KA:0+ 4514 "http://10.171.80.10/agc/vicidial3.php" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36"
10.171.60.170 - - [24/Mar/2021:13:27:22 +0200] "POST /agc/conf_exten_check.php?usr=6969&Dte=2021-03-24%2013:26:22 HTTP/1.1" 200 308 T:17482 KA:0+ 6415 "http://10.171.80.10/agc/vicidial3.php" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36"
For some reason, whenever I tested this, the delayed calls ALWAYS happened at 22 seconds past the minute! Not sure why. Perhaps an internal timer in Chrome starts when I opened Chrome browser at 22 seconds past the minute??
mflorell wrote:We've just added a document to summarize this issue, and the current methods of disabling it,
http://vicidial.org/docs/WEB_BROWSER_JA ... TTLING.txt
1) Download the Extension as a zip file (or clone the repo) from [url]https://github.com/TheBlode/ViCiDial-Keep-Alive[/url].
2) Extract contents to a folder.
3) Go to URL chrome://extensions in Chrome or navigate to the Extensions menu through the interface.
4) Enable "Developer Mode".
5) Click "Load Unpacked".
6) Select the ViCiDial Keep Alive Chrome Extension folder (ViCiDial-Keep-Alive-main\ViCiDial_Keep_Alive).
chrome://flags/#intensive-wake-up-throttling
Throttle Javascript timers in background.
When enabled, wake ups from DOM Timers are limited to 1 per minute in a page that has been hidden for 5 minutes. For additional details, see https://www.chromestatus.com/feature/4718288976216064. – Mac, Windows, Linux, Chrome OS, Android
#intensive-wake-up-throttling
Users browsing this forum: No registered users and 38 guests