News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

IMPORTANT: Large sessions table on Debian/Ubuntu Linux hosted forum?

Started by Daniel15, December 16, 2007, 08:00:14 PM

Previous topic - Next topic

Chriss Cohn

Can't we make a quick mod of it (until it get implemented in 1.1.5 - if they planning to do so)?

Regards, Christian

Daniel15

I don't think it's worth packaging a mod for this fix, seeing as it's a really small one...
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Panzer-


metallica48423

this is the code from 2.0:



                // Use database sessions? (they don't work in 4.1.x!)
                if (!empty($modSettings['databaseSession_enable']) && @version_compare(PHP_VERSION, '4.2.0') != -1)
                {
                        session_set_save_handler('sessionOpen', 'sessionClose', 'sessionRead', 'sessionWrite', 'sessionDestroy', 'sessionGC');
                        @ini_set('session.gc_probability', '1');
                }
                elseif (@ini_get('session.gc_maxlifetime') <= 1440 && !empty($modSettings['databaseSession_lifetime']))
                        @ini_set('session.gc_maxlifetime', max($modSettings['databaseSession_lifetime'], 60));


From what i can see its been solved for a long time
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Ibiza MF

That code is in 1.1.5 also and my table is 1.5 MB with about 10 000 members, 200 online... so this shouldn't be sticky...

Brettflan

Indeed, after upgrading to 2.0b3.1 I've tested it for a couple of weeks without the modification above, and have observed that the sessions table now stays at a reasonable size.
I also occasionally check the running queries for MySQL and have spotted the query running which cleans out old stuff from the sessions table.

Nao 尚

Speaking about this kind of thing...

I've noticed that my smf_log_digest table is growing large. It's not TOO large, but it's supposed to be purged at least on a weekly basis, and I've noticed that my table is filled with message notifications dating from last november! All my 2706 entries have a "daily" value of zero. At line 605 of ScheduledTasks (SMF 2.0):

WHERE ' . ($is_weekly ? 'ld.daily != {int:daily_value}' : 'ld.daily IN (0, 2)'),

"daily_value" is set to 2. So, if $is_weekly is set, all my entries will be used. If it is not set... They will still all be used!

I'm not sure this is the intended behavior... I need to point out that my Scheduled Tasks options for "weekly digest" and "daily digest" are both enabled. I don't know what else is wrong.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

John Knight

Hi, SMF newbie here. 

I am not a techie so please bear with me.   ;)

Would like to know if the problems we're experiencing with our host regarding increase in server memory utilization is related to this?  Just installed SMF about a week ago only. 

I have no idea how to work out the solution, but will give it a try by applying the code change as tipped in this topic. 

here is a screen of the report we got from the host.  Don't know if this is enough info to tie in our problems to the recommended fix for large sessions table.



I also noticed having problems when uploading files via FTP.  The FTP app tells me it couldn't transfer files since there are "too many connections (8) from this IP".  That happens when I am logged on SMF.  When I log-out and closed the browser for the SMF, the FTP file transfer proceeded without problems.

An immediate reply would be appreciate as our account has been suspended already.  :(  We're on shared hosting, btw.

Thanks!




Nao 尚

I don't think it's related...
Your best bet to check for a possible relation would be to launch phpMyAdmin and check whether smf_sessions is huge or not.
Usually problems happen after several months or years, not after a week...
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

John Knight

Quote from: Nao 尚 on July 17, 2008, 04:50:28 AM
I don't think it's related...
Your best bet to check for a possible relation would be to launch phpMyAdmin and check whether smf_sessions is huge or not.
Usually problems happen after several months or years, not after a week...

Thanks, Nao!

Owdy

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Something like that


Owdy

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

glennk

Can I ask what are the problems caused by this (Other than a large file, is there any load issues ?) and do they still exist in smf 2 ?

Something like that

I believe this has been fixed in 2.0 (don't quote me on that though).

I don't believe it will cause any load issues immediately, but if it grows to millions of rows, it will slow down accesses slightly.

Daniel15

QuoteI don't believe it will cause any load issues immediately, but if it grows to millions of rows, it will slow down accesses slightly.
And if it's using MyISAM (the default MySQL engine), the table locking will  eventually become really slow and kill your performance :P
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

glennk

I have moved to cloud hosting, which I keep crashing almost hourly. The hosts technical help department are struggling to locate the problem. Whats the chances that this file is causing my problem ? Im on the latest version of smf 2

青山 素子

If their servers are using Debian, it's possible, otherwise it's not likely.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Something like that

Quote from: glennk on January 20, 2010, 04:27:22 AM
I have moved to cloud hosting, which I keep crashing almost hourly. The hosts technical help department are struggling to locate the problem. Whats the chances that this file is causing my problem ? Im on the latest version of smf 2

Get a competent host?

glennk

Ok, Ive spoke to the host and apparently Im on centos so this isnt my issue I dont think. Thankyou for your help with this one.

Advertisement: