Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3370 by condense diffs function runs out of memory on larger installs

What version are you running?

What's the URL of the page containing the problem?

What steps will reproduce the problem?
1. Running "rb-site manage /var/www/codereview condensediffs"

What is the expected output? What do you see instead?

The operation fails with a MemoryError:

rb-site manage /var/www/codereview condensediffs
Processing 152829 diffs for duplicates...

This may take a while. It is safe to continue using Review Board while this is
processing, but it may temporarily run slower.
Traceback (most recent call last):
  File "/usr/local/bin/rb-site", line 9, in <module>
    load_entry_point('ReviewBoard==2.0', 'console_scripts', 'rb-site')()
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0-py2.7.egg/reviewboard/cmdline/", line 1733, in main
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0-py2.7.egg/reviewboard/cmdline/", line 1662, in run
    site.run_manage_command(args[0], args[1:])
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0-py2.7.egg/reviewboard/cmdline/", line 626, in run_manage_command
    execute_from_command_line([__file__, cmd] + params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/core/management/", line 399, in execute_from_command_line
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/core/management/", line 392, in execute
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/core/management/", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/core/management/", line 285, in execute
    output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/core/management/", line 415, in handle
    return self.handle_noargs(**options)
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0-py2.7.egg/reviewboard/diffviewer/management/commands/", line 29, in handle_noargs
    info = FileDiff.objects.migrate_all()
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0-py2.7.egg/reviewboard/diffviewer/", line 44, in migrate_all
    for filediff in filediffs.iterator():
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/db/models/", line 220, in iterator
    for row in compiler.results_iter():
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/db/models/sql/", line 713, in results_iter
    for rows in self.execute_sql(MULTI):
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/db/models/sql/", line 786, in execute_sql
    cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/db/backends/", line 53, in execute
    return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/db/backends/mysql/", line 124, in execute
    return self.cursor.execute(query, args)
File "/usr/lib/python2.7/dist-packages/MySQLdb/", line 174, in execute
    self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist-packages/MySQLdb/", line 36, in defaulterrorhandler
    raise errorclass, errorvalue

What operating system are you using? What browser?

Ubuntu 12.04 TLS running RB 2.0 on MySql 5.5 backend

Please provide any additional information below.

I upgraded from RB 1.7.25 to 2.0 and got given the advise to run the above command.

You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:

You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to