News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Session timeouts after server move

Started by iwords, May 02, 2010, 07:29:55 AM

Previous topic - Next topic

iwords

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?

Kays

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

iwords

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.

Kays

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

iwords

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.

Kays

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

iwords

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.

Advertisement: