Note: You are currently viewing documentation for Moodle 2.3. Up-to-date documentation for the latest stable version is available here: sessions.
Overview of HTTP Sessions
Session tracking enables you to track a user's progress over multiple servlets or HTML pages, which, by nature, are stateless. A session is defined as a series of related browser requests that come from the same client during a certain time period. Session tracking ties together a series of browser requests—think of these requests as pages—that may have some meaning as a whole, such as a shopping cart application.
By default, moodle does NOT use database to store session information. However, after moodle 1.8, moodle introduced an option (a site setting actually) to store sessions information in the database. If enabled, this setting will use the database to store information about current sessions. This is especially useful for large/busy sites or sites built on cluster of servers. For most sites this should probably be left disabled so that the server disk is used instead. Note that changing this setting now will log out all current users (including you). If you are using MySQL please make sure that 'max_allowed_packet' in my.cnf (or my.ini) is at least 4M.
However, this option currently is still somehow buggy and is NOT recommended. Please see MDL-16641 or ask Petr for more details.