Django Admin - 无法删除某些用户

时间:2017-02-22 03:55:24

标签: django django-admin gunicorn

当我使用django admin删除某些用户时,它会返回以下错误:

ERROR base handle_uncaught_exception Internal Server Error: /admin/auth/user/
Traceback (most recent call last):
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/django/core/handlers/base.py", line 235, in get_response
    response = middleware_method(request, response)
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/htmlmin/middleware.py", line 44, in process_response
    parser=parser)
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/htmlmin/minify.py", line 46, in html_minify
    mini_soup = space_minify(soup, ignore_comments)
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/htmlmin/minify.py", line 69, in space_minify
    space_minify(child, ignore_comments)
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/htmlmin/minify.py", line 69, in space_minify
    space_minify(child, ignore_comments)
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/htmlmin/minify.py", line 69, in space_minify
    space_minify(child, ignore_comments)
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/htmlmin/minify.py", line 69, in space_minify
    space_minify(child, ignore_comments)
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/htmlmin/minify.py", line 69, in space_minify
    space_minify(child, ignore_comments)
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/htmlmin/minify.py", line 69, in space_minify
    space_minify(child, ignore_comments)
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/htmlmin/minify.py", line 69, in space_minify
    space_minify(child, ignore_comments)
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/htmlmin/minify.py", line 69, in space_minify
    space_minify(child, ignore_comments)
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/htmlmin/minify.py", line 101, in space_minify
    soup.string.replace_with(new_string)
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/bs4/element.py", line 231, in replace_with
    self.extract()
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/bs4/element.py", line 258, in extract
    del self.parent.contents[self.parent.index(self)]
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/bs4/element.py", line 938, in index
    for i, child in enumerate(self.contents):
  File "/home/yuanyin/.virtualenvs/transcats/lib/python3.5/site-packages/gunicorn/workers/base.py", line 192, in handle_abort
    sys.exit(1)
SystemExit: 1

但是得到这个:它不会一直出现。当我尝试删除某些用户时,它没有显示出来;它在我尝试删除其他人时出现。发生了什么事?

1 个答案:

答案 0 :(得分:0)

gunicorn可能会中止很长的请求。尝试将--timeout设置为更高的值。