Hey fediverse--

I recently made the switch from desktop Chrome to desktop #Firefox, which has mostly been fine, except for one problem:

Firefox stops bothering to answer AJAX requests in tabs pretty quickly, which makes my preferred webmail client--#Roundcube--FAR less functional under FF than it was under Chrome.

If left alone for a moment--or sometimes, even while typing an email--FF stops paying attention, further AJAX calls fail, and I'm forced to refresh the tab.

Anybody have any ideas?

belated note: I'm running Firefox on Ubuntu 26.04, using the default snap. (Pic related.)

I don't think the problem is localized there, though, because when I went a-web-searchin' I saw MANY similar complaints about Ajax and FF dating back nearly 20 years.

On a suggestion from someone who says they have no issues with Roundcube under Debian FF ESR, I tried installing from Mozilla's Apt repository.

No obvious change, sadly. Still gets stuck on "refreshing" and fails to update.

@jimsalter sure it's not server side? How did you determine it was ajax related?

@oemb1905 it's not server side because it's the same server, same network path, and same workstation on the client side as well. Literally the only change is the browser.

If you've got some other answer than ajax I'm listening, but to the best of my understanding ajax is the way RC keeps a live two-way connection going WITH the server.

What am I missing?

@jimsalter I had an issue only with one account, which was an email address that gets thousands per day (for fail2ban reports). All other accounts worked flawlessly under Firefox, including the PWA extension. For that one, though, I had to beef up dovecot in 10-master.conf as follows:

service imap {
vsz_limit = 4096M
process_limit = 2048
}

Then, similarly in /etc/dovecot/conf.d/20-imap.conf, I had to add/replace:

protocol imap {
imap_max_line_length = 256k
mail_max_userip_connections = 50
imap_idle_notify_interval = 15s
}

This fixed the red bar you get where it says fail to connect. Once that was gone, I can leave the tab (or PWA) open indefinitely and mail just comes in no issue. I only use Firefox for checking Roundcube. My full email server setup is here:

https://wiki.haacksnetworking.org/doku.php?id=computing:mailserver-trixie

Keep me posted and hope you get it sorted. But yeah, I'm kind of neurotic about email so I would certainly notice if it failed to refresh, provide alerts, or function - can't recreate here, but I certainly trust that you are not getting the same results ;(

computing:mailserver-trixie [Haack's Wiki]

@oemb1905 that's interesting, but I don't see how dovecot can be the issue, when the issue happens in one browser but not another (and also not with Thunderbird, which isn't even doing the imap calls *locally* like RC is in this case).
@jimsalter Just sharing the only issue I had as per your inquiry about other areas you might consider besides AJAX, not necessarily implying it's your issue per se, but it was my only issue. Likewise sharing that, under this setup, I'm unable to replicate the refresh issue using the same/similar browser. Sure hope you get it sorted🤞
@jimsalter But/and, I would still certainly check dovecot in these areas and would argue that there is inter-relation with AJAX here. Specifically, the vsz_limit and process_limit help dovecot allocate more memory and processes, which helps dovecot handly frequent AJAX requests for messages, searches, refreshing, etc. Additionally, the imap_max_line_length will help AJAX request for large emails/folders, mail_max_userip_connections helps ensure you can maintain simo requests (including AJAX requests). Lastly, the imap_idle_notify_interval specifically ensures quick back and forth (15 s vs. 2 min) for refresh specifically and ensures it is unlikely you get a timeout. I think this last one could be the culprit upon reflection.