#1483951 closed Bugs (fixed)
Session Timeout on Compose Screen
| Reported by: | afladmark | Owned by: | thomasb |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.1-rc1 |
| Component: | Client Scripts | Version: | git-master |
| Severity: | critical | Keywords: | |
| Cc: | roundcube@…, r.bhatia@… |
Description
When I sit on the compose screen for a while, (on my system its less than 15 minutes) I eventually get thrown out of RoundCube (I think during an auto-save) with an error that my session has expired or is invalid. Shouldn't the Draft auto-save be keeping my session alive?
Attachments (1)
Change History (27)
comment:1 Changed 7 years ago by Lou
comment:2 Changed 7 years ago by afladmark
I guess it's an interesting question in the new AJAX world... The reason I think I disagree is that the page is actively connecting back to the server every minute to save my draft in progress... so technically, I'm not idle... a.) from the AJAX app perspective -- even if I'm typing constantly for 15 minutes it does it (sometimes it takes more than 15 minutes to write a message!; b.) from the PHP/server-side perspective, a connection is made every 1 minute..
The other perspective I'll offer is this... In RoundCube, I can sit, logged in in the Inbox view. The page checks for new messages every few minutes... This page stays logged in for HOURS with no interaction from me... Why apply a different standard to one page vs another..
No?
P.S. When you say session timeout delay, are you referring to PHP's session garbage collection.. or is there a setting for RoundCube itself? This might be a reasonable temp fix...
comment:3 Changed 7 years ago by MarekR
I think, there is an easy way to solve this problem. Just let the compose screen to open in separate window. This solution have one more adventage: you can compose several messages at one time.
comment:4 Changed 7 years ago by patrys
The correct behaviour is to make the AJAX postback extend your session. It sometimes takes half an hour to compose an email (having to check several sources for data the other person is requesting).
comment:5 Changed 7 years ago by entropy
I'm running roundcube as an alternative webmail for a medium size college campus and have been having lots of problems with the session expiring/invalid and logging the person out, sometimes after as little as 2 minutes. It seems to be selective by the account and not the IP address. Some people's account do this and other's dont but I can find nothing to distinguish the two. Any Ideas?
comment:6 Changed 7 years ago by entropy
- Severity changed from major to critical
Addion to my above post: I've done a bunch more testing and it seems that it is not account based after all and does seem to be oddly random. I have found an additional symptom by watching the database entries for sessions:
Just before roundcube punts the user to the login page the session disapears entirely from the table in the database. When they get kicked out it reappears with a new create time and a changed time of a few seconds later. Hope this helps track it down.
comment:7 Changed 7 years ago by thomasb
- Owner set to thomasb
- Status changed from new to assigned
I guess the changing auth cookie causes a validation failure.
r338 includes some changes to the authentication function as well as a debug log for failed session validations. Please try it out.
comment:8 Changed 7 years ago by zyzzyvas
I wanted to chime in here...I am having horrible problems with sessions expiring using 0.1-beta2. Usually happens while in the middle of composing a message, and no draft is saved. Have to retype everything...
Looking forward to a fix.
comment:9 Changed 6 years ago by olive@…
- Version changed from 0.1-beta to 0.1-beta2
Manually merging selected changes from [e170b4b7] into my 0.1-beta2 roundcube, it seems this bug is fixed. I've been logged on for 30+ minutes, and i left the composing window alone for most of the time, coming back to it only 3 times ; I haven't been disconnected so far.
Before the [e170b4b7] merge I felt very frustrated about beeing disconnected during composition of very long mails to my friends, and loosing most of the content of the mail (it disconnected during draft save)...
Now this seems fixed with [e170b4b7]. Note that I didn't merge everything from this patch, but only the relevant changes to *.session.* in all the files.
Thanks for pointing us to this fix.
comment:10 Changed 6 years ago by mkaatman
- Resolution set to fixed
- Status changed from assigned to closed
This is no longer an issue with the latest SVN.
comment:11 Changed 6 years ago by dai
- Milestone changed from 0.1-rc1 to 0.1-beta2
- Resolution fixed deleted
- Status changed from closed to reopened
I have 0.1-beta2.1 installed and have also the Session Timeout Problem ca. 6 minutes after starting composing a new mail. The first autosaving functions well and the message has been saved. Then comes "Your session is invalid or expired" and i'm logged out.
I have also increased the global Session timeout from 10 to 60 minutes. It doesn't help.
How can i fix this.
comment:12 Changed 6 years ago by thomasb
- Milestone changed from 0.1-beta2 to 0.1-rc1
- Resolution set to fixed
- Status changed from reopened to closed
This bug is fixed in the current SVN version. It remains in the bet but please not reopen it because of that.
You can set $rcmail_configsession_lifetime? = 0; to prevent timeouts.
comment:13 Changed 6 years ago by mankytongue
- Resolution fixed deleted
- Status changed from closed to reopened
The bug is still present in SVN version (current version in use is [02479770]).
'session_lifetime' is set to 0 as per the previous comment but it has no effect on this bug.
comment:14 Changed 6 years ago by cy23
I have this behaviour sometimes when i get new email while composing. Maybe this helps.
comment:15 Changed 6 years ago by thomasb
- Owner changed from thomasb to fourat.zouari
- Status changed from reopened to new
Marked #1484299 as duplicate of this bug. Lokks like it doesn't only affect the compose screen.
comment:16 Changed 6 years ago by fourat.zouari
- Status changed from new to assigned
comment:17 Changed 6 years ago by fourat.zouari
I can't replicate this bug on my local [518] version, i let the compose screen open for 1 day and nothing happens.
Can you provide for the moment, informations like :
- Steps-to-reproduce scheme.
- Environment details (OS/Apache version/PHP version/MySQL version)
comment:18 Changed 6 years ago by mcuria
I've recently upgraded my 0.1b installation to the latest svn code, and reproduced this bug. After a few tests, I dropped the database tables (mysql), ran the initial db scripts, and the problem vanished.
So, I believe the problem is probably a bug in the upgrade scripts.
comment:19 Changed 6 years ago by imars
I have a fresh install of 0.1beta2.2 here, no upgrade done, and I have encountered the problem. (Luckily the previous 1-2 saves to Drafts worked, so I only lost a paragraph or so.)
I run a FreeBSD 4 server, with MySQL 4.1.14 and Apache/1.3.34 (Unix) PHP/5.2.0.
comment:20 Changed 6 years ago by RealMurphy
- Version changed from 0.1-beta2 to svn-trunk
I just encountered the same problem with a fresh SVN checkout (552 IIRC). I started to type a message, I got the message that the draft was saved on the server (after the configured 180s) and after a few extra seconds the browser showed that my session expired and reloaded the log-in screen while I was still typing the message.
I'm running Ubuntu edgy on the server, sqlite backend, Apache 2.0.55 with PHP/5.1.6.
So far I have not yet tried to set the timeout to 0, that's the next step I'll try.
comment:21 follow-up: ↓ 22 Changed 6 years ago by thomasb
- Owner changed from fourat.zouari to thomasb
- Status changed from assigned to new
Can you reproduce this with
$rcmail_config['ip_check'] = false; $rcmail_config['double_auth'] = false;
Should work with the appropriate settings.
comment:22 in reply to: ↑ 21 Changed 6 years ago by RealMurphy
Replying to thomasb:
Can you reproduce this with
$rcmail_config['ip_check'] = false; $rcmail_config['double_auth'] = false;Should work with the appropriate settings.
With these settings it seems to work fine (at least for me)!
comment:23 Changed 6 years ago by maharaja
is there still a demand to fix this bug in 0.1beta?
because if so i can try to extract my patch which seems to work most of the time.
please inform me! (best thing would be via the mailinglist)
comment:24 Changed 6 years ago by thomasb
What patch? Could you please share it with us?
comment:25 Changed 6 years ago by thomasb
- Resolution set to fixed
- Status changed from new to closed
Close it for now. Please re-open with new details about the problem.
comment:26 Changed 6 years ago by maharaja
- Cc roundcube@…, r.bhatia@… added
i tried to isolate my patch - please take a look.
i take no guarantee that my patch won't undermine the
security which you tried to implement with the session handling :)

I would think this is working as designed. Log in to RC, start writing a message and walk away. I want RC to log me out after my inactivity lasts too long.
You can always change the session timeout delay if you find it is too short.