Edgewall Software

Ticket #3779 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Reports takes minutes to complete

Reported by: omry at yadan dot net Owned by: cboos
Priority: high Milestone: 0.10.1
Component: wiki system Version: 0.10b1
Severity: critical Keywords: slow
Cc: trac@…

Description (last modified by cboos) (diff)

My database contains about 35 tickets. recently reports started to work very slowly. when I open a report, apache cpu usage spikes to 100% for a few minutes (!) and then I get the results. I inserted the sql query directly into sqlite3, and it returned instantly


Note: this is a problem with the wiki engine, when rendering attachment:ticket35.txt
-- cboos

Attachments

trac.db.sqlite3.zip (201.0 KB) - added by omry 2 years ago.
my database file. (sqlite 3)
ticket35.txt (0.7 KB) - added by anonymous 2 years ago.

Change History

Changed 2 years ago by omry

if you need my database or anything else to reproduce, just ask.

Changed 2 years ago by cboos

Can you first try if this is reproductible for you using tracd?

Changed 2 years ago by mgood

  • keywords needinfo added

Changed 2 years ago by omry

it is.

Changed 2 years ago by omry

I mean, it is reproduceable with tracd.

Changed 2 years ago by omry

my database file. (sqlite 3)

Changed 2 years ago by omry

  • keywords needinfo removed
  • milestone set to 0.10.1

assigned to milestone 0.10.1

Changed 2 years ago by eblot

  • milestone 0.10.1 deleted

Do not assign a milestone without providing a reason or a patch.

Please describe your environment (version of the OS, Python, Svn, Pysqlite, etc.)

Changed 2 years ago by omry

Debian etch. Kernel 2.6.15. Python 2.4 SVN 1.3.2 pysqlite: 1.1.7-2 AND 2.3.2-1 (could this be the problem?)

Changed 2 years ago by anonymous

and sqlite 3.3.7

Changed 2 years ago by trac@…

registered email.

Changed 2 years ago by trac@…

figured it out: ticket 35 in the attached database had a long message insife ![brackets]. when I deleted it from the database all went back to normal.

Changed 2 years ago by cboos

  • owner changed from daniel to cboos

hm, that's not a good reason to take minutes... Can you please copy/paste that message in a block, here? (or attach it?)

Changed 2 years ago by trac@…

  • cc trac@… added

I removed it from my database, but its in the attached file. ticket 35.

Changed 2 years ago by franck34

After upgrade sqlite2 -> sqlite3, got same problem. Very slow and httpd > 99% CPU (eaccelerator website ...)

Changed 2 years ago by franck34

sorry, i forgot some things: Fedora Core 3, Python 2.4 Trac 0.9.3

Before update sqlite, everything was ok.

Changed 2 years ago by anonymous

franck34, as an emergency care, find the bad ticket and remove it from the database. you can do it by viewing all the tickets on at a time till you find the slow one. there was no obvious way to remove the ticket, but I found something after some searching.

Changed 2 years ago by franck34

  • keywords slow added

Very good !

I found a ticket with a description > 300 000 chars.

I've change the description of this ticket and i put 99% of the description in an attachement instead of directly in the description.

Now everything is ok, problem solved for me.

Changed 2 years ago by franck34

As suggested by matt_good on irc, request feature as been written in ticket #3944

Changed 2 years ago by anonymous

My problem is not due to a huge ticket size. I extracted the ticket content from the database and I am attacing.

Changed 2 years ago by anonymous

Changed 2 years ago by cboos

  • component changed from report system to wiki
  • description modified (diff)
  • milestone set to 0.10.1

Right, problem reproduced. Thanks for having extracted the ticket35.txt ;)

Changed 2 years ago by cboos

Ok, the problem comes from the definition list regexp. The stuff I added for being a bit more robust in the presence of `...` quotes have some performance issues (ref #2082, #2083).

Changed 2 years ago by cboos

  • status changed from new to closed
  • resolution set to fixed

Above issue fixed by r3949:3950.

Changed 2 years ago by cboos

  • summary changed from Reports takes minutes to compleet to Reports takes minutes to complete

Changed 2 years ago by anonymous

great, thanks.

Add/Change #3779 (Reports takes minutes to complete)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.