「データベース接続持続時間を増やす」の版間の差分
Mitsuhiro Yoshida (トーク | 投稿記録) 編集の要約なし |
Mitsuhiro Yoshida (トーク | 投稿記録) 編集の要約なし |
||
1行目: | 1行目: | ||
作成中です - [[利用者:Mitsuhiro Yoshida|Mitsuhiro Yoshida]] 2007年7月15日 (日) 13:17 (CDT) | 作成中です - [[利用者:Mitsuhiro Yoshida|Mitsuhiro Yoshida]] 2007年7月15日 (日) 13:17 (CDT) | ||
[http://moodle.org/mod/forum/discuss.php?d=35801 Kunal Kapoor氏の投稿]を基にしたアドバイス: | |||
私は共用サーバを使用していますが、サーバの制限を越えたため、すぐに使用を中止しなくてはなりません。数多くの検索の結果、DBセッションの使用が影響していることを発見しました。MySQLのタイムスタンプの終了を理解するのに時間がかかりましたが、1970年1月1日 12:00am.より秒数計算されることが分かりました。 | 私は共用サーバを使用していますが、サーバの制限を越えたため、すぐに使用を中止しなくてはなりません。数多くの検索の結果、DBセッションの使用が影響していることを発見しました。MySQLのタイムスタンプの終了を理解するのに時間がかかりましたが、1970年1月1日 12:00am.より秒数計算されることが分かりました。 |
2007年7月15日 (日) 18:20時点における版
作成中です - Mitsuhiro Yoshida 2007年7月15日 (日) 13:17 (CDT)
Kunal Kapoor氏の投稿を基にしたアドバイス:
私は共用サーバを使用していますが、サーバの制限を越えたため、すぐに使用を中止しなくてはなりません。数多くの検索の結果、DBセッションの使用が影響していることを発見しました。MySQLのタイムスタンプの終了を理解するのに時間がかかりましたが、1970年1月1日 12:00am.より秒数計算されることが分かりました。
It was only by doing this was I able to calculate the exact number of seconds that my dbsessions were lasting. This value was nowhere near the value chosen in the Admin >> Variables. [Quick Note: this is due to a bug in Moodle's code (#5912), which doesn't use this value when using dbsessions. It may have been fixed by the time you read this or not. Check the bug status: http://moodle.org/bugs/bug.php?op=show&bugid=5912].
So I did more searching. I found that I needed to adjust session.gc_maxlifetime in php.ini. Because I'm on a shared server, I had to make this change via the .htaccess file. So I changed this number from 1440 seconds (25 minutes) to 14400 (4 hours) by adding this line:
php_value session.gc_maxlifetime "14400"
This then gave me my 4 hour sessions (after checking against the MySQL table using a nifty Excel spreadsheet I quickly made).