Advertisement:

Author Topic: Session timeouts after server move  (Read 1690 times)

Offline iwords

  • Semi-Newbie
  • *
  • Posts: 21
Session timeouts after server move
« on: May 02, 2010, 07:29:55 AM »
My ISP recently migrated my SMF 1.1.11 forum to a new, more powerful server.  They kindly handled everything for me, and everything generally works fine.

However, every now and then, my users are receiving a session timeout error when they try to submit a post.  They click the 'Post' button and they receive an error in red that reads:-

"Your session timed out while posting. Please try to re-submit your message."

Sometimes the error will appear several times in quick succession: I've seen the error twice in a row within the space of 10 secs or so, i.e. type a reply, click 'Post', get the timeout error, immediately press 'Post' again, and immediately get another timeout error.

I've asked my ISP about session settings on the server and they say they're set for 24 mins.

What I've also noticed is that sometimes not all new posts will be shown when you click "Show unread posts since last visit."  So, if I click "Show unread posts since last visit" and read all the new posts that appear, when I return to the forum index I can see that some boards still contain lots of unread posts.  These aren't new posts made since I clicked "Show unread", and to read them, I'll have to go into each board in turn and click on each thread that has the 'new' indicator next to it.

I've TRUNCATEd smf_sessions and smf_log_online, cleared out cookies and browser caches for all users experiencing this problem, and tried using a different cookie name, as suggested in various other threads, although unfortunately all without success so far.

Some of my Admin settings:-

Use a persistent connection - unchecked
Default login cookies length (in minutes) - 60
Enable local storage of cookies - unchecked
Enable compressed output - checked
Use database driven sessions - checked
Seconds before an unused session timeout - 2880

Version information:-

Forum version: SMF 1.1.11
Current SMF version: SMF 1.1.11
PHP version: 5.2.13
MySQL version: 5.0.90-log
Server version: Apache
GD version: bundled (2.0.34 compatible)

Before the move, SMF was working perfectly.

I have very few mods installed, and I've tried uninstalling them all and running with a bare forum - unfortunately, that didn't change anything.

Does anyone have any ideas?

Offline Kays

  • Customizer
  • SMF Hero
  • *
  • Posts: 8,948
  • Gender: Male
    • Kayssplace
Re: Session timeouts after server move
« Reply #1 on: May 02, 2010, 08:28:13 AM »
If the forums were just moved, the settings shouldn't have changed. Also SMF handles it's own sessions so any server settings shouldn't have an effect.

A couple of long shots. Try running repair_settings.php just in case there has been a subtle change in the paths. (What is repair_settings.php?)

If that doesn't help try changing the cookie name.

Does this happen with any particular browser or with all?
 

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Offline iwords

  • Semi-Newbie
  • *
  • Posts: 21
Re: Session timeouts after server move
« Reply #2 on: May 02, 2010, 08:39:28 AM »
Thanks for the reply.

I ran repair_settings.php immediately after the migration was complete, as most of the paths (to themes, smileys, etc) needed to be updated.  Everything else was OK I believe.

I have tried changing cookie name but that doesn't seem to have improved things, unfortunately.

As far as I can tell, the problem occurs will all browsers.

Offline Kays

  • Customizer
  • SMF Hero
  • *
  • Posts: 8,948
  • Gender: Male
    • Kayssplace
Re: Session timeouts after server move
« Reply #3 on: May 02, 2010, 09:20:59 AM »
That is a bit weird then.

In Server Settings > Feature Configuration, try changing "Use subdomain independent cookies". It's the only setting which you didn't show the value for.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Offline iwords

  • Semi-Newbie
  • *
  • Posts: 21
Re: Session timeouts after server move
« Reply #4 on: May 04, 2010, 05:56:14 AM »
I had that unchecked, but running with it checked doesn't seem to improve things.

We're getting session verification errors when people try to quote posts now, too.

My ISP has offered to move the session save path to a directory inside our webspace in case there's some clean-up routine running on the server that's causing grief.  I'll give this a shot, but I can't help feeling something inside SMF's db has gone haywire for some reason, but I don't know what to do to check for it.

Offline Kays

  • Customizer
  • SMF Hero
  • *
  • Posts: 8,948
  • Gender: Male
    • Kayssplace
Re: Session timeouts after server move
« Reply #5 on: May 04, 2010, 08:33:36 AM »
If you are using database driven sessions, then the sessions folder doesn't come into play.

Try disabling database driven sessions.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Offline iwords

  • Semi-Newbie
  • *
  • Posts: 21
Re: Session timeouts after server move
« Reply #6 on: May 08, 2010, 11:56:30 AM »
Just to update this, I spent a bit more time comparing the config of the old and new servers, and discovered that my ISP was using the Suhosin PHP hardening extension on the new box.

Despite them reassuring me that Suhosin should work fine with SMF, I asked them to disable Suhosin's session encryption for my domain, and things seem to have improved since then, with only one reported session timeout in the last few days.

I'll be keeping my eye on things, but my thanks for your assistance, Kays.