Author Topic: AJAX Requests occasionaly freezes the UI  (Read 3362 times)

Offline VojtechB

  • Newbie
  • *
  • Posts: 2
AJAX Requests occasionaly freezes the UI
« on: September 20, 2016, 09:57:06 AM »
Hello,
I have a problem with Roundcube 1.0.5 (Running on Ubuntu 12.04.5 TLS)

In approx. 20% of AJAX requests (automatic inbox refresh / switching pages) the request timeouts (in Firefox 48.0.2 - but happens in other browsers as well).

Screenshot from firebug:
http://prntscr.com/ck89uh

Please note that when I right-clicked on the request and resend it manually. It completed normally (564ms). Whenever it gets stuck like this user can only F5 refresh or wait for the request to timeout.
Is there something I might have missed in the configuration?

This is a CURL dump of the request:
Code: [Select]
curl 'http://mail2.mydomain.com/?_task=mail&_mbox=INBOX&_page=3&_action=list&_remote=1&_unlock=loading1474379111149&_=1474378929568' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.5' -H 'Cookie: __utma=114165509.596222598.1462822143.1474220459.1474278245.17; __utmz=114165509.1462822143.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); squirrelmail_language=deleted; language=cs; roundcube_sessid=m2niaajs3eod2j0p7jlbp61ev3; roundcube_sessauth=Sd0650302a1de5bf8c7c9a334c76cad34b8de414f' -H 'Host: mail2.mydomain.com' -H 'Referer: http://mail2.mydomain.com/?_task=mail' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0' -H 'X-Requested-With: XMLHttpRequest' -H 'X-Roundcube-Request: 2eb2fe3f5e414b67c7d77d088606a2e5'

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: AJAX Requests occasionaly freezes the UI
« Reply #1 on: September 21, 2016, 01:06:00 AM »
That sounds like a problem with the web server or maybe a firewall, its not going to be a problem with the Roundcube config.

Offline VojtechB

  • Newbie
  • *
  • Posts: 2
Re: AJAX Requests occasionaly freezes the UI
« Reply #2 on: September 21, 2016, 02:39:07 AM »
How can it be related to firewall? Its whether allowed or not, isnt it?
As for the web server. I am running on apache2, are there some recommended options for php setup that might cause the problems? (ex. low memory limit)?

Also is there a possibility to somehow set a timeout on those ajax request (even in the code directly)?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: AJAX Requests occasionaly freezes the UI
« Reply #3 on: September 21, 2016, 12:48:07 PM »
Firewalls will sometime do rate limiting, which could cause the timeout to occur. You need to look at the web server and firewall logs and see what is happening to the requests.