Traceback (most recent call last):
File "/home/predator/.virtualenvs/cs-uwsgi/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 223, in get_response
response = middleware_method(request, response)
File "/home/predator/.virtualenvs/cs-uwsgi/local/lib/python2.7/site-packages/debug_toolbar/middleware.py", line 129, in process_response
panel.generate_stats(request, response)
File "/home/predator/.virtualenvs/cs-uwsgi/local/lib/python2.7/site-packages/debug_toolbar/panels/sql/panel.py", line 192, in generate_stats
query['sql'] = reformat_sql(query['sql'])
File "/home/predator/.virtualenvs/cs-uwsgi/local/lib/python2.7/site-packages/debug_toolbar/panels/sql/utils.py", line 27, in reformat_sql
return swap_fields(''.join(stack.run(sql)))
File "/home/predator/.virtualenvs/cs-uwsgi/local/lib/python2.7/site-packages/sqlparse/engine/filter_stack.py", line 34, in run
for stmt in stream:
File "/home/predator/.virtualenvs/cs-uwsgi/local/lib/python2.7/site-packages/sqlparse/engine/statement_splitter.py", line 100, in process
for ttype, value in stream:
File "/home/predator/.virtualenvs/cs-uwsgi/local/lib/python2.7/site-packages/debug_toolbar/panels/sql/utils.py", line 14, in process
for token_type, value in stream:
File "/home/predator/.virtualenvs/cs-uwsgi/local/lib/python2.7/site-packages/sqlparse/lexer.py", line 48, in get_tokens
m = rexmatch(text, pos)
MemoryError
Recently we started using django-picklefield in order to store a relatively big (1-5 MB) data structure inside one of our models.
So when we call
.save()on ourModelthis creates a bigINSERT/UPDATEquery and when Django Debug Toolbar process it aMemoryErroris being raised.If we stop the
SQLpanel from the check-boxes, everything works fine.We have tried to run
reset_queries()immediately after the.save()call but it didn't help.Here is a Traceback: