Opened 18 months ago
Closed 3 months ago
#1488229 closed Bugs (worksforme)
session constraint violation
| Reported by: | corbosman | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.9-stable |
| Component: | Database | Version: | 0.7-beta |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by alec)
im seeing a few dozen of these in our logs. Running 0.7 beta. We have 15 parallel servers, so maybe different servers create the same id?
Nov 30 11:13:07 roundcube11.xs4all.net roundcube: DB Error: MDB2 Error: constraint violation Query: _doQuery: [Error message: Could not execute statement] [Last executed query: EXECUTE mdb2_statement_pgsql_2e1fc76fad93b24d8ea007f4c07551161e538b2a3 ('b4bda2bba2dc4c49f81e95ad09d0c04c', 'dGVtcHxiOjE7bGFuZ3VhZ2V8czo1OiJubF9OTCI7dGFza3xzOjU6ImxvZ2luIjs=', '87.213.106.130')] [Native message: ERROR: duplicate key value violates unique constraint "session_pkey"] in /data/WWW/release-0.7/program/include/rcube_mdb2.php on line 708 (GET /?_task=mail&_action=check-recent&_mbox=INBOX&_list=1&_quota=1&_remote=1&_unlock=0&_=1322647854106)
Database is postgres.
Change History (14)
comment:1 Changed 18 months ago by GieltjE
comment:2 Changed 18 months ago by alec
- Milestone changed from later to 0.7-stable
Duplicate of #1488196 ?
comment:3 follow-up: ↓ 4 Changed 18 months ago by corbosman
I dont think so, but that Gieltje says makes sense. Ive got 5000 simultaneous users online right now on RC, and i see this very sporadically.
comment:4 in reply to: ↑ 3 Changed 18 months ago by GieltjE
Replying to corbosman:
I dont think so, but that Gieltje says makes sense. Ive got 5000 simultaneous users online right now on RC, and i see this very sporadically.
I can't seem to replicate it, even when I close my browser longer than the timeout period. (I do see the "Your session has expired or is invalid." message in the browser, but no error log).
-edit: I use MySQL, and also experience this randomly
comment:5 Changed 18 months ago by alec
Strange thing is that log says it happens on check-recent action (could you check _action parameter for other error entries?). This action is not executed on (or immediately after) log in.
comment:6 Changed 18 months ago by corbosman
Im seeing it on lots of actions.. list, keep-alive, getunread, etc. Even see it on logout task.
Nov 30 12:43:49 roundcube10.xs4all.net roundcube: DB Error: MDB2 Error: constraint violation Query: _doQuery: [Error message: Could not execute statement] [Last executed query: EXECUTE mdb2_statement_pgsql_2f94f
75df55d77ec8108d31c1f53dfea764f359e3 ('4c358012fa6ceff19d3c2a625a03353a', 'dGVtcHxiOjE7bGFuZ3VhZ2V8czo1OiJubF9OTCI7dGFza3xzOjU6ImxvZ2luIjs=', 'x.y.z')] [Native message: ERROR: duplicate key value viol
ates unique constraint "session_pkey"] in /data/WWW/release-0.7/program/include/rcube_mdb2.php on line 708 (GET /?_task=logout)
comment:7 Changed 17 months ago by sikkerhedorg
I'm seeing this error too. From our logs: (edited for whitespace)
2012-01-12T16:16:55.640808+01:00 webmail.sikkerhed.org DB Error:
MDB2 Error: constraint violation Query: _doQuery:
[Error message: Could not execute statement]
[Last executed query: EXECUTE mdb2_statement_pgsql_
4ed23484b056e3b6b304b95442806099f9928a503
('shiv14fd405re41bg1acfkaal3',
'bGFuZ3VhZ2V8czo1OiJkYV9ESyI7dGVtcHxiOjE7',
'88.17.141.227')
]
[Native message:
ERROR: duplicate key value violates unique constraint "session_pkey"]
in /usr/share/roundcube/program/include/rcube_mdb2.php on line 713
(GET /?_task=mail&_action=getunread&&_remote=1&_unlock=0&_=1326381415733)
comment:8 Changed 15 months ago by umount
I have latest svn version and have the same problem in error log
[26-Feb-2012 20:53:46 +0400]: DB Error: MDB2 Error: constraint violation Query: _doQuery: [Error message: Could not execute statement] [Last executed query: EXECUTE mdb2_statement_pgsql_3bc471db396f5c771c4117b4c
7da6e4d26d48ecfe ('a0n71qomd0o1q12vc0ephtqq01', 'dGVtcHxiOjE7bGFuZ3VhZ2V8czo1OiJlbl9VUyI7dGFza3xzOjU6ImxvZ2luIjs=', '91.227.52.180')] [Native message: ERROR: duplicate key value violates unique constraint "sessio
n_pkey"] in roundcubemail/program/include/rcube_mdb2.php on line 708 (GET /mail/)
Update: Sorry I view database and have bug http://trac.roundcube.net/ticket/1488196
comment:9 Changed 15 months ago by umount
After update database (now sess_id varchar(128)) I am also have error
[01-Mar-2012 11:08:01 +0400]: DB Error: MDB2 Error: constraint violation Query: _doQuery: [Error message: Could not execute statement] [Last executed query: EXECUTE mdb2_statement_pgsql_52c590c2a9e2ee7d4266ee6a5
5b49f5974eb68887 ('vqfrdp762rtsqq37v4vg9f36j6', 'bGFuZ3VhZ2V8czo1OiJydV9SVSI7dGVtcHxiOjE7c2tpbnxzOjg6IndlYm1vbmV5Ijs=', '91.227.52.180')] [Native message: ERROR: duplicate key value violates unique constraint "session_pkey"] in /roundcubemail/program/include/rcube_mdb2.php on line 722 (POST /mail/?_task=&_action=login)
comment:10 follow-up: ↓ 11 Changed 15 months ago by alec
I say, these errors (constraint violation on session table) are normal and we should probably just not print them to the log. Did you observe any issues using Roundcube while these errors were logged?
comment:11 in reply to: ↑ 10 Changed 15 months ago by umount
Replying to alec:
I say, these errors (constraint violation on session table) are normal and we should probably just not print them to the log. Did you observe any issues using Roundcube while these errors were logged?
No I do not observe any issues yet.
comment:12 Changed 14 months ago by ndazza
As of today, I am unable to login to my roundcube install and this error message appears in my logs.
My environment is:
- Roundcube v0.8 beta
- Postgresql v8.4.11
- nginx v0.8.54
- php5-cgi v5.3.5
- I'm using the new skin 'larry'
- This is a simple single-user install
Upon attempting to login the UI reports:
Your session is invalid or expired.
The exact error message I get in my logs (newlines added for clarity):
[20-Mar-2012 00:17:51 -0400]: DB Error: MDB2 Error: constraint violation Query:
_doQuery: [Error message: Could not execute statement] [Last executed query:
EXECUTE mdb2_statement_pgsql_4b35dd01f7cf4c4c20bc616650150f34e2eb5beaa
('tj454uk78gla3pjptnjmbknur1',
'bGFuZ3VhZ2V8czo1OiJlbl9VUyI7dGVtcHxiOjE7c2tpbnxzOjU6ImxhcnJ5Ijs=', '203.14.70.52')]
[Native message: ERROR: duplicate key value violates unique constraint "session_pkey"]
in /var/www/mail/program/include/rcube_mdb2.php on line 722 (GET /mail/?_task=mail&
_action=check-recent&_mbox=INBOX&_list=1&_quota=1&_remote=1&_unlock=0&_=1332217115910)
comment:13 Changed 6 months ago by corbosman
As of 0.8.4 i still see tons and tons of these every day. It doesnt seem to cause any issues (at least, i dont get complaints). Do you have any idea what circumstances lead to this issue Alec?
comment:14 Changed 3 months ago by alec
- Description modified (diff)
- Resolution set to worksforme
- Status changed from new to closed
It's about time to test this with 0.9. With this version I don't see this error in my logs anymore.

I am getting the same error and was about to post a ticket about it. The only difference is we are running a single server and it seems to happen when a user returns after the session timeout has expired. (e.g. browser sends same session ID and roundcube tries to recreate it).