使用Django遇到麻烦的蝗虫

时间:2019-03-01 05:01:11

标签: django python-3.5 gevent locust greenlets

我在本地测试了蝗虫,它运转得很好。但是,当我在Django应用程序的服务器上运行蝗虫时,它将无法运行。这是我调用负载测试时给我的错误:-

Traceback (most recent call last):   File "/usr/lib/python3.5/socketserver.py", line 625, in process_request_thread
    self.finish_request(request, client_address)   File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)   File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()   File "/var/www/html/venv/lib/python3.5/site-packages/django/core/servers/basehttp.py", line 169, in handle
    self.handle_one_request()   File "/var/www/html/venv/lib/python3.5/site-packages/django/core/servers/basehttp.py", line 179, in handle_one_request
    self.raw_requestline = self.rfile.readline(65537)   File "/usr/lib/python3.5/socket.py", line 575, in readinto
    return self._sock.recv_into(b)   File "/var/www/html/venv/lib/python3.5/site-packages/gevent/_socket3.py", line 384, in recv_into
    self._wait(self._read_event)   File "/var/www/html/venv/lib/python3.5/site-packages/gevent/_socket3.py", line 156, in _wait
    self.hub.wait(watcher)   File "/var/www/html/venv/lib/python3.5/site-packages/gevent/hub.py", line 652, in wait
    result = waiter.get()   File "/var/www/html/venv/lib/python3.5/site-packages/gevent/hub.py", line 899, in get
    return self.hub.switch()   File "/var/www/html/venv/lib/python3.5/site-packages/gevent/hub.py", line 631, in switch
    return RawGreenlet.switch(self) gevent.hub.LoopExit: ('This operation would block forever', <Hub at 0x7fbcb81242a8 epoll pending=0 ref=0 fileno=1)

任何人都可以告诉我如何解决此错误。

0 个答案:

没有答案