Outage August 4 & 5

Started by John Raabe, August 05, 2013, 05:32:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hpinson

Don, is there a way in the SMF admin panel to store session cookies on the file system rather than in the database directly?  Also, how many minutes are sessions timeout set for in the SMF admin panel?  Try 30 minutes (will log users off after 30 and free up some resources).


MountainDon

Quotehow many minutes are sessions timeout set for in the SMF admin panel?  Try 30 minutes (will log users off after 30 and free up some resources).

was 90, now 30

Quoteis there a way in the SMF admin panel to store session cookies on the file system rather than in the database
???    there is this in the 'server settings" admin area....
"Use database driven sessions"   The info pop up has this to say...
"This option makes use of the database for session storage - it is best for load balanced servers, but helps with all timeout issues and can make the forum faster."

This choice was selected to be active.

I have changed it to be non-selected, non active.



There is also the setting...
"Seconds before an unused session timeout"
with the info popup...
"This is the number of seconds for sessions to last after they haven't been accessed. If a session is not accessed for too long, it is said to have "timed out". Anything higher than 2400 is recommended."

This was set at 4000. It is now set at 2500.



John, those are all in   
Administration Center »
Server Settings »
Cookies and Sessions
Just because something has been done and has not failed, doesn't mean it is good design.


hpinson

Exactly -- now lets see if the crashing problem goes away, and if forum performance suffers (as far as I can tell it is still quite good).

Only downside is that people who leave their browsers logged in will get logged out after 30 minutes.  If there are complaints consider pushing to 40 - 50 - or even 60 minutes, but the shorter the more available resources.




John Raabe

Those look like good changes. 30 mins of unattended time seems plenty. We are all used to restarting open windows that time out. Thanks Don and HP!

There was a surge in page views in July. Up from an Ave 21,938/day for 2012 to 42,500/day in 2013. For Aug '13 we are averaging 36,660/day so far.
None of us are as smart as all of us.

John Raabe

#29
Don:

Here is something I found in an SMF support forum article on the best performance tweaks

Move your uploaded avatars directory

In the administration panel, go to Attachments and Avatars, and then go to Avatar Settings.

For Upload avatars to... select: Specific directory... For Upload directory: put in the raw, publicly accessible server directory you want them added to ie /var/www/yoursite/docs/forums/avs

So assuming /docs was your webroot, you would put /forums/avs for your upload URL. Don't do what I did and make it a subdirectory of your main avatars directory, SMF still handles it like an attachment directory for some reason so if someone uploads a .png avatar, someone else decides to use it and the first person replaces it with a .jpg avatar, the first will be deleted.

The benefit of this borders on the ridiculous. Every single avatar load is another php call, which loads a session, the user's settings and permissions, the board and its theme. In addition, two additional calls to the database are made to load the avatar itself, and to increment the view counter. So not only are you reducing the processor load on your server, but you are also reducing your database load. If five different avatars are displayed on a page, that's five additional php calls and dozens of database queries getting made.

After you do this access index.php?action=manageattachments;sa=moveAvatars to use the hidden feature to move your avatars over.


This setting is in

    CountryPlans Design/Build Forum »
    Administration Center »
    Attachments and Avatars »
    Avatar Settings

It looks like we have an Avatar directory under the SMF dir. Should we build another folder outside the SMF forum - perhaps avatars in the public section?

PS - Looking at the error logs on Site 5 a lot of our errors are attempting to load avatar images (ie: smf/avatars/dilbert.gif). Those errors are coming in at 5 to 10 per minute. They are mostly image requests. Some are for an "apple-touch-icon.png" which lots of sites apparently get as an error message from page requests from iphones.

PPS - Looking at the file manager the above avatar directory only has old preloaded images from 2004, not the images most members are using as avatars.

None of us are as smart as all of us.


MountainDon

I take that to mean place an  avatar  folder in the   smf    folder. Then direct the uploaded user avaters to that directory.

???  Does doing that have any effect on already uploaded user avatars?

It is also possible to do a maintenance run on removing avatars for members not active in over "nnn"  number of days.   Here, admins only have access
Just because something has been done and has not failed, doesn't mean it is good design.

John Raabe

That looks like we only have 30 avatars, that may be the old default ones from 2004. Where are the rest?  ???
None of us are as smart as all of us.

MountainDon

For several years now users have only been able to choose from the SMF built in avatars or to link to a remotely stored (ie. photobucket) avatar. No uploads of an avatar has been allowed. Same as no uploads of images or other files.

I wonder what causes most server load? Avatars on our server someplace or the call to bring an avatar from the remote host to the viewers own computer?  ???
Just because something has been done and has not failed, doesn't mean it is good design.

hpinson

It is a URI text string call from the database. The browser renders.


John Raabe

Yes, I realize now that the avatar load on our forum is probably quite low since few people use the default images. Most people have avatars that are just a short piece of code.

Still, Most of the errors in the Site 5 log are image requests that don't complete.
None of us are as smart as all of us.

hpinson

It's the right approach though for sure. As you work through the error log, squash each error (for example bad paths to Avatars ).  Each error does take its toll.

From your message above it looks like maybe an incomplete or bad path to the local avatars entered in the SMF admin panel.

smf/avatars/dilbert.gif

A complete path would be from the root:  For example.

/path/to/smf/avatars/

John Raabe

Here is a summary of 1 minute of the Site 5 error log (15 mins ago)
9 errors
4 (403.shtml errors) to a forum post that was started in 2012 (this resolves fine when you copy and paste the URL address.)
4 errors calling an image, apple-touch-icon.png or icon-precomposed.png. These are expected to be the main public_html directory and don't exist.
1 error to smf/index.php (which exists)

Further down (2 mins earlier) are a batch of errors for gif files in the smf/avatars directory that don't exist.

Does that tell us anything?
None of us are as smart as all of us.

hpinson

What is the URL address?

A 403 errors means that some web reference to another server is not resolving -- probably content (an image?) that existed once and is now gone - and somebody looked at a forum page with this problem.  The target web server is saying I can't find what you are looking for is "Forbidden" or in other words can't be found. I know there is quite a bit of this missing image content in older posts, so would accept this error as a normal occurance and probably ignore.

One hack to fix the not-resolving avatar images is to place 1 pixel .png, .jpg, or .gif images with the corresponding names in the referenced directory.  My gut reaction os that you can safely ignore these, especially as the error count is so low.

Not sure what the error to the index.php refers to. Would have to look at the actual error log and not the control panels version of it -- or perhaps you are seeing the actual log in the CP, but error reporting is not set to an informative enough level.