#5621 closed defect (worksforme)
SQL error when accepting a ticket
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | ticket system | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
I'm using a plain-vanilla Trac install (via apt-get) on Ubuntu 7.04.
I'm logged into Trac. I browsed the list of pretend tickets I'd created. I selected on, when to the bottom of the resulting web page, selected the "accept ticket" option, and hit the "Submit changes" button.
The web browser hung while trying to retrieve the resulting web page. This appeared at the bottom of my Trac logfile:
2007-06-28 17:00:02,249 Trac[report] DEBUG: Executing report with SQL "SELECT id AS report, title FROM report ORDER BY report" ([]) 2007-06-28 17:00:06,779 Trac[report] DEBUG: Executing report with SQL " SELECT p.value AS __color__, t.milestone AS __group__, (CASE status WHEN 'closed' THEN 'color: #777; background: #ddd; border-color: #ccc;' ELSE (CASE owner WHEN ''||%s||'' THEN 'font-weight: bold' END) END) AS __style__, id AS ticket, summary, component, status, resolution,version, t.type AS type, priority, owner, changetime AS modified, time AS _time,reporter AS _reporter FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' ORDER BY (milestone IS NULL), milestone DESC, (status = 'closed'), (CASE status WHEN 'closed' THEN modified ELSE (-1)*p.value END) DESC " ([u'christian.convey@gmail.com'])
Attachments (0)
Change History (5)
comment:1 by , 17 years ago
follow-up: 3 comment:2 by , 17 years ago
Severity: | blocker → critical |
---|
OK, more info: When I set "smtp_enabled = false", this problem goes away.
So I think what's happening is that having SMTP problems causes tracd to block, preventing it from sending the next page to the client.
May I suggest that notification email sending happens in a different thread than the thread that issues the next webpage to the user who performed the action?
comment:3 by , 17 years ago
Component: | general → ticket system |
---|---|
Resolution: | → worksforme |
Severity: | critical → normal |
Status: | new → closed |
Replying to anonymous:
May I suggest that notification email sending happens in a different thread than the thread that issues the next webpage to the user who performed the action?
You may, but the answer is no ;-)
This topic has already been discussed. The issue comes from the SMTP server, not from Trac. You need to fix the SMTP server. Adding background threads in Trac would make it far more complex - as it is a web application that handles all the processing synchronously with the client request, and would not address the actual issue anyway.
Closing the ticket as worksforme, as this is an installation issue (SMTP server), not a bug in Trac.
comment:5 by , 17 years ago
See #3220 for the discussion about background tasks and SMTP notification.
I don't think it was a SQL error after all, because the database changes were effective.
A better title for this error might be "browser hangs after user pushes "Submit changes" button on ticket page".
The real symptom seems to be that after hitting the "Submit changes" button, my browser hangs on waiting for the next page, and I don't know why.
I can cancel the waiting by clicking Firefox's left-arrow (go back one item in browsing history) button, which brings me back to that ticket's information page. If I then hit the browser reset button, I do see the changed status of the ticket - that is, it's clear that my "Submit changes" click had been effective.
I don't see any activity in the Trac logfile when this happens, even though I have logging level set to "debug".