Occasionally ticket queries fail with a database error:

Oops#
Trac detected an internal error:

OperationalError: ERROR:  duplicate key violates unique constraint 
"session_attribute_pk"

The query is this, with host and project name redacted:

https://redacted1.ir.bbn.com/projects/redacted2/query?status=assigned&status=new&status=reopened&group=milestone&component=build&order=priority&max=1000

and in the log

2008-10-31 06:58:38,521 Trac[main] ERROR: ERROR:  duplicate key violates unique 
constraint "session_attribute_pk"
Traceback (most recent call last):
  File "usr/pkg/lib/python2.4/site-packages/trac/web/main.py", line 423, in 
_dispatch_request
    dispatcher.dispatch(req)
  File "usr/pkg/lib/python2.4/site-packages/trac/web/main.py", line 222, in 
dispatch
    req.session.save()
  File "usr/pkg/lib/python2.4/site-packages/trac/web/session.py", line 102, in 
save
    "VALUES(%s,%s,%s,%s)", attrs)
  File "usr/pkg/lib/python2.4/site-packages/trac/db/util.py", line 57, in 
executemany
    return self.cursor.executemany(sql_escape_percent(sql), args)
  File "usr/pkg/lib/python2.4/site-packages/trac/db/util.py", line 57, in 
executemany
    return self.cursor.executemany(sql_escape_percent(sql), args)
  File "/usr/pkg/lib/python2.4/site-packages/pyPgSQL/PgSQL.py", line 3109, in 
executemany
    self.execute(query, _i)
  File "/usr/pkg/lib/python2.4/site-packages/pyPgSQL/PgSQL.py", line 3072, in 
execute
    raise OperationalError, msg
OperationalError: ERROR:  duplicate key violates unique constraint 
"session_attribute_pk"

Usually this query works fine - when I get the error I can just reload
(recent firefox 2 over ssl)

I am running 0.11.1 on NetBSD 4 i386 via Xen3 with postresql back end
and the following software versions:

ap22-py24-python-3.3.1 Apache module that embeds the Python interpreter
ap22-py24-wsgi-2.3  WSGI module for apache
ap22-subversion-1.5.4 WebDAV server (Apache module) for Subversion
apache-2.2.9nb5     Apache HTTP (Web) server, version 2
apr-1.3.3           Apache Portable Runtime
apr-util-1.3.4      Apache Portable Runtime utilities
py24-PgSQL-2.4nb5   Python DB-API 2.0 compliant interface to PostgreSQL
py24-babel-0.9.4    Collection of tools for internationalizing Python 
applications
py24-expat-0nb4     Python interface to expat
py24-genshi-0.5.1   Python toolkit for generation of output for the web
py24-mxDateTime-2.0.6nb1 Python extension that provides types and conversions 
for dates
py24-pytz-2008bnb1  World timezone definitions, modern and historical
py24-setuptools-0.6c8 New Python packaging system
py24-subversion-1.5.4 Python bindings and tools for Subversion
python24-2.4.5nb2   Interpreted, interactive, object-oriented programming 
language
subversion-base-1.5.4 Version control system, base programs and libraries
trac-0.11.1nb3      Subversion repository browser, wiki, and issue tracking 
system

Attachment: pgp6YNmKe4Bv0.pgp
Description: PGP signature

Reply via email to