Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-63642

Implement persistent connections in Redis cache and session store

    • MOODLE_35_STABLE
    • MDL-63642-redis-persistent-master
    • Hide

      Configuration

      Assuming an existing Redis installation...

      For sessions:

      1. Add $CFG->session_redis_persistent = true; and $CFG->session_redis_persistent_id = 'sess'; to /config.php.

      For MUC:

      1. Browse to /cache/admin.php and modify your Redis store instance with Use persistent connection? checked and Persistent connection ID as muc.

      Testing

      1. Loading the site for a few minutes to ensure that all workers in the SAPI have connected.
      2. Verify that netstat -ntap (for TCP connection) or netstat -nxap (for socket connection) shows at most 2 * the number of workers connections.
      Show
      Configuration Assuming an existing Redis installation... For sessions: Add $CFG->session_redis_persistent = true; and $CFG->session_redis_persistent_id = 'sess'; to /config.php . For MUC: Browse to /cache/admin.php and modify your Redis store instance with Use persistent connection? checked and Persistent connection ID as muc . Testing Loading the site for a few minutes to ensure that all workers in the SAPI have connected. Verify that netstat -ntap (for TCP connection) or netstat -nxap (for socket connection) shows at most 2 * the number of workers connections.

      Persistent connections can, in some configurations, save setup time by eliminating the overhead of opening a connection to the server, allowing pooling of open connections. The MUC and session stores don't currently expose this option though the PHP Redis extension supports it.

            lukecarrier Luke Carrier
            lukecarrier Luke Carrier
            Votes:
            8 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.