PathfinderWiki
Log in

Forum:Editing time out

From PathfinderWiki
Forums: Grand Lodge (moved to Workshop) > Editing time out

Many times has this happened to me, but last night I must have had the message when I saved a completed update along the lines of: 'Your session has timed out...' and missed it - it comes up as a red line of text at the top of the page - and then went to bed, so lost a bit of work, as I couldn't find a copy in my History this morning as I'd rebooted since. This is most frustrating. Usually (I think, but now wonder) I catch this and all you have to do is submit for a second time immediately afterwards and it saves correctly.

But why do we have this 'feature'? We are all logged in for 180 days or so, so why does the wiki time you out when you are working on long complex page updates? Thus we risk losing the work that we have worked longest on. Is there any way this can be turned off please? Or is it just a feature of networking and thus nothing to do at the wiki end?

Yours in frustration and hope,

J

(Moved thread to Workshop)

Yeah, it bugs me too. After some research, I don't think it's a MediaWiki feature but rather a PHP setting. If it's the one I suspect (session.gc_maxlifetime[1]), the timeout defaults to 1,440 seconds (24 minutes). Previewing the edit doesn't seem to renew this timer, but clicking the "Show changes" does. The 180-day timeout when you login is only for authentication and has no effect here.

I think PHP does this for a couple reasons: to free up server resources by ignoring idle visitors[2], and to prevent someone from hijacking an active session left open on a shared computer.[3] The message you see is MediaWiki failing to find your session information; it retains your edit in the edit box so you can try to resubmit it.

(As a workaround I generally copy the full text from the edit box after getting this message, then check the edit history to make sure someone hasn't edited the article in the interim. If not, I click the Edit tab and paste my edited version back into the box and save. Not particularly helpful in your example, sadly.)

I'll try increasing that setting by a few minutes to see if that has any unexpected adverse effects. The PHP docs suggest the setting's upper limit is around 18 hours (65,535 seconds). What length would you suggest? An hour?

Many thanks for looking into this and even finding a a way to get around it. I can be working on a large or complex piece over many hours but 24 mins sounds woefully short. The wiki has other ways of dealing with dual editing but actually, knowing it is 24 minutes means one can plan, so let's say 2 hours - perhaps we should be saving after that sort of time anyway to prevent other forms of accident destroying work. Maybe we could add a warning though to the edit box to let people know they are on a timer?

Cheers

J

I bumped the timeout to 30 minutes and am keeping an eye on the server over the next day or so to see what effect it has on server resources (if any).

I haven't seen a material increase in resource use, so I've bumped it to 60 minutes and will reassess after another stretch.

This week's Mediawiki upgrade added a small bonus here: the article now saves successfully if you re-attempt the save after receiving the session timeout message. No copying-and-pasting or logout necessary, just click Save again and it should work.

Hmm, I just spotted that I lost some work a while back almost certainly due to this 'feature'. I have redone it now, but can we not now just remove this element entirely please, as I see no benefit and heaps of potential data loss? Your last note is interesting Oznogon as I had that capability before the upgrade already: I never needed to do the acrobatics you suggested just hit save again and it was published. Of course that only worked if I spotted that the page had not been saved it seems.

I'm sorry this is still an issue, but this is not a MediaWiki limitation and I haven't found a way to completely eliminate it without opening the wiki to excessive server resource usage. If it takes you several hours to edit articles and you're unable to confirm the article is saved before closing the editor, I'd strongly recommend using a text editor instead and copying the results over.

If that changes, you'll be the first to know, trust me.

(Turning on new settings in 1.20 that make MW handle the session cache instead of PHP caused MW to unhelpfully fail all sessions for the last five minutes. So if you're editing an article and it takes more than an hour and you never preview changes, please pay attention to what happens when you click "Save page" and click it again if necessary.)

Thanks again Oznogon. I'll just have to try to remember to save more often. What is (if there is one) the current safe time for editing that will ensure this error message doesn't occur please?