Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      as commented in chat... we need something related to sessions in new stuff.

      Analyse the possibility to use $DB (will save one connection compared with current approach).

      And also the possibility of specify different $DB.

      just to avoid forgetting about it.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              skodak Petr Skoda added a comment -

              adodb sessions are not working at all in 1.9.x and before, because it lacks session locking code (== multiple open windows or linked files override each others changes)
              we need something better in 2.0

              Show
              skodak Petr Skoda added a comment - adodb sessions are not working at all in 1.9.x and before, because it lacks session locking code (== multiple open windows or linked files override each others changes) we need something better in 2.0
              Hide
              jamiesensei Jamie Pratt added a comment -

              Getting the following notices and warnings from tablelib code. They just started a few days ago after an update of HEAD :

              Notice: Indirect modification of overloaded property moodle_session::$flextable has no effect in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 360

              Notice: Indirect modification of overloaded property moodle_session::$flextable has no effect in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 361

              Notice: Indirect modification of overloaded property moodle_session::$flextable has no effect in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 362

              Notice: Indirect modification of overloaded property moodle_session::$flextable has no effect in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 363

              Notice: Indirect modification of overloaded property moodle_session::$flextable has no effect in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 364

              Notice: Indirect modification of overloaded property moodle_session::$flextable has no effect in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 365

              Notice: Indirect modification of overloaded property moodle_session::$flextable has no effect in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 368

              Warning: Attempt to assign property of non-object in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 417

              Show
              jamiesensei Jamie Pratt added a comment - Getting the following notices and warnings from tablelib code. They just started a few days ago after an update of HEAD : Notice: Indirect modification of overloaded property moodle_session::$flextable has no effect in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 360 Notice: Indirect modification of overloaded property moodle_session::$flextable has no effect in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 361 Notice: Indirect modification of overloaded property moodle_session::$flextable has no effect in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 362 Notice: Indirect modification of overloaded property moodle_session::$flextable has no effect in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 363 Notice: Indirect modification of overloaded property moodle_session::$flextable has no effect in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 364 Notice: Indirect modification of overloaded property moodle_session::$flextable has no effect in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 365 Notice: Indirect modification of overloaded property moodle_session::$flextable has no effect in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 368 Warning: Attempt to assign property of non-object in C:\Users\Pratt\workspace\moodle-HEAD\lib\tablelib.php on line 417
              Hide
              skodak Petr Skoda added a comment -

              this is caused by http://bugs.php.net/bug.php?id=39449, grrrrrrrrrr

              working on a hack

              Show
              skodak Petr Skoda added a comment - this is caused by http://bugs.php.net/bug.php?id=39449 , grrrrrrrrrr working on a hack
              Hide
              skodak Petr Skoda added a comment -

              I hope this problem is now fixed in cvs

              Show
              skodak Petr Skoda added a comment - I hope this problem is now fixed in cvs
              Hide
              chuang Wen Hao Chuang added a comment -

              +1 for this, here at SFSU we running a really big site on a VM system (VMWare), and we are seeing some session-related issues that lead to slow performance....

              Show
              chuang Wen Hao Chuang added a comment - +1 for this, here at SFSU we running a really big site on a VM system (VMWare), and we are seeing some session-related issues that lead to slow performance....
              Hide
              skodak Petr Skoda added a comment -

              db sessions are now working fine for mysql and pg, not compatible with mssql and oracle

              Show
              skodak Petr Skoda added a comment - db sessions are now working fine for mysql and pg, not compatible with mssql and oracle
              Hide
              quen Sam Marshall added a comment -

              As part of the change under this bug number, the following code was added:

              } else if ((!isset($CFG->dbsessions) or $CFG->dbsessions) and $DB->session_lock_supported())

              { // default recommended session type $session = new database_session(); }

              else {
              // legacy limited file based storage - some features and auth plugins will not work, sorry
              $session = new legacy_file_session();

              For performance we were thinking about moving to local disk-based sessions and it would definitely be nice to have this as an option! Questions:

              1) why do file sessions not work? do they really not work? is this documented somewhere as to what doesn't work? If so maybe the comment could include a link to the more detailed information. There is no info on legacy_file_session class either...

              2) this is at the least unfortunate, when file sessions are a good way to take load off overworked db server...

              (ok #2 that wasn't a question)

              Show
              quen Sam Marshall added a comment - As part of the change under this bug number, the following code was added: } else if ((!isset($CFG->dbsessions) or $CFG->dbsessions) and $DB->session_lock_supported()) { // default recommended session type $session = new database_session(); } else { // legacy limited file based storage - some features and auth plugins will not work, sorry $session = new legacy_file_session(); For performance we were thinking about moving to local disk-based sessions and it would definitely be nice to have this as an option! Questions: 1) why do file sessions not work? do they really not work? is this documented somewhere as to what doesn't work? If so maybe the comment could include a link to the more detailed information. There is no info on legacy_file_session class either... 2) this is at the least unfortunate, when file sessions are a good way to take load off overworked db server... (ok #2 that wasn't a question)
              Hide
              skodak Petr Skoda added a comment -

              1/ file based sessions are problematic because you are not notified when the sessions expires - the file just gets deleted at some random time
              2/ it is not possible to "query" folder with file sessions
              3/ there are other way to off load db servers, for example shared memory

              Show
              skodak Petr Skoda added a comment - 1/ file based sessions are problematic because you are not notified when the sessions expires - the file just gets deleted at some random time 2/ it is not possible to "query" folder with file sessions 3/ there are other way to off load db servers, for example shared memory
              Hide
              quen Sam Marshall added a comment -

              thanks.

              #1 why/in which places does moodle need to know when the session expires, i.e. what does this break?

              #2 why/in which places is the 'query' feature needed? This sounds like a dealbreaker for local file sessions as by definition it is not possible if they are stored locally and you have more than one server, however I don't understand why it would ever be necessary.

              #3 I thought sessions were written on every request? if this is the case then they will still cause very high DB load even if the reads are cached.

              Show
              quen Sam Marshall added a comment - thanks. #1 why/in which places does moodle need to know when the session expires, i.e. what does this break? #2 why/in which places is the 'query' feature needed? This sounds like a dealbreaker for local file sessions as by definition it is not possible if they are stored locally and you have more than one server, however I don't understand why it would ever be necessary. #3 I thought sessions were written on every request? if this is the case then they will still cause very high DB load even if the reads are cached.

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    24/Nov/10