Roundcube and Redis

Discussion in 'ISPConfig 3 Priority Support' started by Stelios, Mar 2, 2025.

  1. Stelios

    Stelios Active Member HowtoForge Supporter

    Hi,
    I'm trying to setup redis with roundcube to improve the search speed without any luck.
    I have a multi server setup where Roundcube is on the same server with controlpanel and multiple email servers where Dovecot is installed on them with FTS indexing plugin and a few other settings.
    However the problem lies on the Roundcube/Redis.

    I got in my config.inc.php:

    Code:
    // Enable Redis for caching and sessions
    $config['cache_driver'] = 'redis';
    $config['session_storage'] = 'redis';
    
    // Correct way to define Redis hosts
    $config['redis_hosts'] = array(
        '127.0.0.1:6379:1'
    );
    
    // Enable caching of IMAP searches and message lists
    $config['imap_cache'] = "redis";
    $config['cache_index'] = true;
    $config['cache_thread'] = true;
    $config['cache_messages'] = true;
    $config['message_cache_lifetime'] = '30d';
    
    // Debugging options
    $config['debug_level'] = 4;
    $config['log_driver'] = 'syslog';
    
    I tried a few other combinations that I found on default.inc.php file but no luck, when I test with redis-cli it doesn't show the proper values.

    Any idea?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I have not tried such a setup, so I can't help you with that config. In general, if you feel searching is too slow and you are not using RoundCube only but also other mail clients like Outlook or Thunderbird, then I would consider setting up another search engine in Dovecot and not in the webmail client. What comes to my mind there is setting up dovecot with solr or lucene
     
  3. Stelios

    Stelios Active Member HowtoForge Supporter

    I have already solr & lucene in place. It took down from 3+ minutes the search to 30 seconds but for further speed it needs redis but doesn't work at all and can't find why.
    I do use Roundcube, on Roundcube I'm trying to speed up search.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    But, does the RoundCube cache really speeds up search in general, or does it just cache search results? It looks like it caches just results, so it would speed things up only if you search twice for the same term(s) on the same set of emails.
     
  5. Stelios

    Stelios Active Member HowtoForge Supporter

    Yes it is working on twice the search. The 3+ minutes I mentioned is when you search first time a large mailbox. The 2nd time goes down to 30sec. If I manage somehow to make Redis to work it will cache on it the previous search and will bring the results instantly (nearly). This is what I'm trying to achieve. In Redis there are many options to keep search for X time etc so very flexible.
     

Share This Page