Issue Details (XML | Word | Printable)

Key: MDL-14992
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Petr Skoda
Reporter: Eloy Lafuente (stronk7)
Votes: 1
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-14679

M2: adodb sessions switched to moodle sessions

Created: 26/May/08 08:54 AM   Updated: 12/Mar/09 12:41 AM
Return to search
Component/s: Database SQL/XMLDB
Affects Version/s: 2.0
Fix Version/s: 2.0

Issue Links:
Relates
 

Participants: Eloy Lafuente (stronk7), Jamie Pratt, Petr Skoda, Sam Marshall and Wen Hao Chuang
Security Level: None
Resolved date: 20/Jan/09
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
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.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Skoda added a comment - 20/Jun/08 06:31 AM
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

Jamie Pratt added a comment - 22/Jun/08 06:43 PM
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


Petr Skoda added a comment - 22/Jun/08 07:54 PM
this is caused by http://bugs.php.net/bug.php?id=39449, grrrrrrrrrr

working on a hack


Petr Skoda added a comment - 22/Jun/08 07:56 PM
I hope this problem is now fixed in cvs

Wen Hao Chuang added a comment - 09/Sep/08 07:39 AM
+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....

Petr Skoda added a comment - 20/Jan/09 01:54 AM
db sessions are now working fine for mysql and pg, not compatible with mssql and oracle

Sam Marshall added a comment - 11/Mar/09 11:26 PM
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)


Petr Skoda added a comment - 12/Mar/09 12:11 AM
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

Sam Marshall added a comment - 12/Mar/09 12:41 AM
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.