Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@myrobot.text回复函数运行超过一段时间会导致连接失败 #804

Open
Nonponder opened this issue Apr 26, 2023 · 1 comment
Open

Comments

@Nonponder
Copy link

使用werobot接入chatGPT,由于chatGPT计算时间很长导致运算长时间不回复报错:
`WSGI application error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 266, in
inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 533, in run
self.started = True
--- ---
File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 508, in run
self.write(elem)
File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 462, in write
return blockingCallFromThread(
File "/usr/lib/python3/dist-packages/twisted/internet/threads.py", line 122, in blockingCallFromThread
result.raiseException()
File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 467, in raiseException
raise self.value.with_traceback(self.tb)
builtins.AttributeError: 'NoneType' object has no attribute 'writeHeaders'

Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/bottle.py", line 3026, in run
return sa(self.host, self.port, **self.options).run(handler)
File "/usr/local/lib/python3.8/dist-packages/bottle.py", line 2931, in run
reactor.run()
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1267, in run
self.mainLoop()
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1276, in mainLoop
self.runUntilCurrent()
--- ---
File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 875, in runUntilCurrent
f(*a, **kw)
File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 521, in wsgiError
self.request.loseConnection()
File "/usr/lib/python3/dist-packages/twisted/web/http.py", line 1551, in loseConnection
self.channel.loseConnection()
builtins.AttributeError: 'NoneType' object has no attribute 'loseConnection'
`
目前正常回复原始query不会报错,只有超时情况会报错,请问如何解决?

@empty-id
Copy link

empty-id commented Oct 5, 2023

同样的问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants