phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0017841phplist applicationOtherpublic22-09-15 13:0223-09-15 15:59
Reporterduncanc 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.2.0 
Target Versionnext patchFixed in Version3.2.1 
Summary0017841: Keep-alive requests are being sent too often
DescriptionI'm seeing unexpected results in the Firefox web console when a tab of the Send Message page is open.

Initially there is a keep-alive request sent but there are also two other requests. One for jquery and a second for phplistapp.js. See the attached screenshot for an example. Is there a reason for those two files being requested?

Further, leaving the tab open the frequency of the requests increases. The screenshot shows the requests being sent three times within 2 seconds. After a few minutes the requests seem to be sent several times, then a gap of about one minute, then the requests sent several times again.

TagsNo tags attached.
Attached Filespng file icon Screenshot_keepalive.png [^] (51,110 bytes) 22-09-15 13:02


png file icon keepalive changed.png [^] (19,398 bytes) 23-09-15 07:22

- Relationships

-  Notes
(0056880)
michiel (manager)
22-09-15 13:05


ah, I thought I had increased that time quite a lot. Maybe it didn't propagate.

This will be good to fix quickly, as it will cause browser issues.
(0056882)
michiel (manager)
22-09-15 15:26

ah, yes, the reason for the js files to be included is 0016924

I couldn't figure out why I wasn't able to do jQuery calls in the snippet that is fetched with an Ajax call. It only worked when I included jQuery again in the snippet. That's rather annoying. Do you have a way to do that? Maybe something like "top.jQuery"?
(0056886)
duncanc (developer)
23-09-15 07:21

I'm not sure that I understand fully how the javascript is meant to work but I also saw messages in the Firefox console about "too much recursion", which may indicate a problem in the way that this is trying to work.

I found an alternative using the setInterval() function, which creates a repeating event.

This now seems to work for me

use setInterval instead of setTimeout in phplistapp.js and change autosave() to

function autoSave() {
  // in the future, do an auto-save, for now, we want to keep the session alive
  $.get('./?page=pageaction&ajaxed=true&action=keepalive');
}
Now keepalive.php doesn't need to return anything specific

$status = '';

See the second screenshot where the keepalive is being repeated every 30s with no explosion of requests. Also, the js files are now not requested.
(0056887)
michiel (manager)
23-09-15 15:59

https://github.com/phpList/phplist3/commit/d6aba6cb25395b0438b5c729bf687695d9f00e97 [^]


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker