我有一个应用服务器和运行gunicorn的api服务器。这两个服务器都是金字塔应用程序。
浏览器从应用服务器加载html和静态文件,然后直接与api服务器通信。
浏览器需要进行文件上传操作。这一直都有效。我已经为执行文件上传的OPTION方法做了以下操作,因为它是一个跨域帖子
response.headers['Access-Control-Allow-Origin'] = origin
问题是本地计算机已开始超时对api服务器的OPTION调用。第一次出现此错误
File "/home/ranjith/workspace/venv/local/lib/python2.7/site-packages/gunicorn-0.17.4-py2.7.egg/gunicorn/workers/sync.py", line 87, in handle
req = six.next(parser)
File "/home/ranjith/workspace/venv/local/lib/python2.7/site-packages/gunicorn-0.17.4-py2.7.egg/gunicorn/http/parser.py", line 39, in __next__
self.mesg = self.mesg_class(self.cfg, self.unreader, self.req_count)
File "/home/ranjith/workspace/venv/local/lib/python2.7/site-packages/gunicorn-0.17.4-py2.7.egg/gunicorn/http/message.py", line 152, in __init__
super(Request, self).__init__(cfg, unreader)
File "/home/ranjith/workspace/venv/local/lib/python2.7/site-packages/gunicorn-0.17.4-py2.7.egg/gunicorn/http/message.py", line 49, in __init__
unused = self.parse(self.unreader)
File "/home/ranjith/workspace/venv/local/lib/python2.7/site-packages/gunicorn-0.17.4-py2.7.egg/gunicorn/http/message.py", line 167, in parse
line, rbuf = self.read_line(unreader, buf, self.limit_request_line)
File "/home/ranjith/workspace/venv/local/lib/python2.7/site-packages/gunicorn-0.17.4-py2.7.egg/gunicorn/http/message.py", line 217, in read_line
self.get_data(unreader, buf)
File "/home/ranjith/workspace/venv/local/lib/python2.7/site-packages/gunicorn-0.17.4-py2.7.egg/gunicorn/http/message.py", line 155, in get_data
data = unreader.read()
File "/home/ranjith/workspace/venv/local/lib/python2.7/site-packages/gunicorn-0.17.4-py2.7.egg/gunicorn/http/unreader.py", line 38, in read
d = self.chunk()
File "/home/ranjith/workspace/venv/local/lib/python2.7/site-packages/gunicorn-0.17.4-py2.7.egg/gunicorn/http/unreader.py", line 65, in chunk
return self.sock.recv(self.mxchunk)
error: [Errno 4] Interrupted system call
2013-05-27 11:37:17 [19097] [INFO] Handling signal: winch
2013-05-27 11:37:17,533 ERROR [gunicorn.error][MainThread] Error processing request.
然后它完全停止工作。所有其他电话都有效。过去的OPTIONS调用工作。我不确定为什么这不起作用,这让我感到沮丧。同样适用于我们的测试服务器等。我不确定什么是破坏的以及为什么