How to stop recording in the table forumsfud_ses ? [message #27183] |
Mon, 29 August 2005 20:05 |
matthieu_phpmv
Messages: 44 Registered: November 2004
Karma: 0
|
Member |
|
|
Hello
Fudforum is perfect, very fast, efficient (love rss), etc.
Thank you !
But i have one problem, the table 'forumsfud_ses' that in the past crashed several times (had to re-create it..), and which becomes VERY quickly HUGE (~ 40mo) and i don't like it very well.
How to disable the forumsfud_ses recording, which is, I think, not necessary for fudforum to work.
Thank you
Matthieu
|
|
|
Re: How to stop recording in the table forumsfud_ses ? [message #27190 is a reply to message #27183] |
Mon, 29 August 2005 21:07 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
It is a critical table where the sessions are stored, without it the forum cannot track users. The table is automtically cleared of old entries periodically on login.php. If that is not frequent enough you can add a cron job to do the same thing.
FUDforum Core Developer
|
|
|
|
|
Re: How to stop recording in the table forumsfud_ses ? [message #27198 is a reply to message #27183] |
Mon, 29 August 2005 21:37 |
matthieu_phpmv
Messages: 44 Registered: November 2004
Karma: 0
|
Member |
|
|
Ok i understand, but don't you think its strange that nobody loggued in so long that 40Mb can be logged in the DB ?
Anyway wouldn't it be interesting to add a cron task to do this ?
I'm thinking of such a feature for phpmyvisites.
I'm not still sure of how I will do this, but i have this idea (my task is once a day).
- Add a @ignore_user_abort( true ); at the top of the file.
- at the bottom of each page view, visitor looks the last modification time of a file "last.dat"
- if day is not today, launch cron task
- when task is lauching, edit the file and add information about the task, and update with info about what is accomplished, etc. for example
- when task is finished, touch the file with today time
- if day is today, skip
what do you think of this idea ?
it will be used for archiving huge datas, sending mails, update rss, etc.
The advantage is that the big process could be computed in several times if server limits time execution.
Mat
|
|
|
Re: How to stop recording in the table forumsfud_ses ? [message #27199 is a reply to message #27198] |
Mon, 29 August 2005 21:57 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Well, you are probably using cookies with long expiry time so sessions can hang around for a long time. if you want to avoid massive build-up of the sessions table, simply running the following query:
DELETE FROM sessions_table WHERE time_sec< NOW() + 2*86400
This will remove all sessions older then 2 days.
High usage forum installs should really be using cron and not adding various hacks to the code. The only reason the hack exists in the place is that not everyone has access to cron.
FUDforum Core Developer
[Updated on: Mon, 29 August 2005 21:57] Report message to a moderator
|
|
|
Re: How to stop recording in the table forumsfud_ses ? [message #27200 is a reply to message #27199] |
Mon, 29 August 2005 22:05 |
matthieu_phpmv
Messages: 44 Registered: November 2004
Karma: 0
|
Member |
|
|
I understand perfectly your thoughts, the real problem is that a lot of FUD forums users, and a lot of phpmyvisites users don't have access to a cron, and a lot of them don't know what a cron is. They just install the "great" package they've discovered, and it must work by itself, without other technical considerations than give the loging/password/db host.
And for their usage of our software, I'm considering seriously such a cron task job emulation.
I think it's a good idea, because it makes software more "user friendly" that it is. And "user friendly" is really good for software.
[Updated on: Mon, 29 August 2005 22:06] Report message to a moderator
|
|
|
|
Re: How to stop recording in the table forumsfud_ses ? [message #27202 is a reply to message #27200] |
Mon, 29 August 2005 22:13 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Sessions table is well indexed, even if you have take up 40 megs (not all that much data actually) is not a problem. The forum does remove absolete entries from it, but not on every request that is ineffecient. There are a number of things you can do to reduce the number of entries via simple configuration tricks:
1) make cookies expire sooner.
2) use session cookies.
FUDforum Core Developer
|
|
|
|