Webmail with Gateway Timeout

Should be removed …

Done.

Okay. I finally fixed the error.

/etc/apache2/apache2.conf
Timeout 120
ProxyTimeout 120

I don’t know if this fixes the issue. I also changed it to 60.
/etc/php/7.4/fpm/php.ini
max_execution_time = 60

Hmm probably not worth updating the config files for it then.

Maybe caused by large mail boxes…

We are talking about 1GB mail boxes. Nothing huge. @eris I have read that this issue disappears if you set Fastcgi for roundcube. Is that a good idea?

If Apache2 is running in event mode should enable it by default: hestiacp/hestia-event.conf at main · hestiacp/hestiacp · GitHub

Okay. I have done the testing.

I have ony had one episode of 5 timeouts in the same minute. I think that the problem is that server can’t handle more than 4 concurrent queries. Since it’s a 4GB ram and 4 Cores VPS I find it inefficient.

I agree with you @eris that my patch is not a good general solution to the problem.

I am happy with the server as is, since I am sending configured thunderbird portable zip files to the clients and therefore I will only need webmail as a backup plan.

But if there is something else that we could try so that roundcube could efficiently handle more concurrent traffic I am willing to do the experiment if you find it interesting.

1 Like

I just :heart: this idea!! Thanks for sharing.

I just tweaked roundcube for performance. The test results are promising it feels lighter. I’ll let you know how it goes this week.

These are my new settings.

/etc/roundcube/config.inc.php
82: $rcmail_config[‘imap_auth_type’] = LOGIN;
185: $rcmail_config[‘smtp_auth_type’] = ‘LOGIN’;
239: $rcmail_config[‘session_lifetime’] = 10;
388: $rcmail_config[‘message_sort_col’] = ‘’;
456: $rcmail_config[‘enable_spellcheck’] = false;
490: $rcmail_config[‘max_pagesize’] = 50;
494: $rcmail_config[‘min_keep_alive’] = 120;
504: $rcmail_config[‘undo_timeout’] = 0;
691: $rcmail_config[‘mail_pagesize’] = 50;
728: $rcmail_config[‘draft_autosave’] = 120;
731: $rcmail_config[‘preview_pane’] = true;
738: $rcmail_config[‘logout_purge’] = false;
741: $rcmail_config[‘logout_expunge’] = false;
754: $rcmail_config[‘skip_deleted’] = false;
766: $rcmail_config[‘keep_alive’] = 120;
769: $rcmail_config[‘check_all_folders’] = false;

For more info:
https://web.archive.org/web/20120426005946/http://trac.roundcube.net/wiki/Howto_Performance

They also suggest to include an imap proxy to improve performance:

Use a caching IMAP proxy

If you are experiencing delays when clicking on a message or folder (>0.5 sec) try adding a caching IMAP proxy on the webserver. Roundcube creates a new IMAP connection (which is expensive) every time a user clicks on a message. An IMAP proxy will reuse IMAP connections on a per user basis. There are reports of performance going from ~3 sec per click, to ~0.5 sec per click. ​​ImapProxy is a free IMAP proxy module that is easy to use and works great for Unix-like OSes.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.