AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Gateway Error shutsdown the whole application

Open eleijonmarck opened this issue 2 years ago • 4 comments

Duplicates

  • [X] I have searched the existing issues

Steps to reproduce 🕹

I turned it on in continous mode for y -100 and then i came back with the following error:

Current behavior 😯

openai.error.APIError: Gateway timeout. {"error":{"code":524,"message":"Gateway timeout.","param":null,"type":"cf_gateway_timeout"}} 524 {'error': {'code': 524, 'message': 'Gateway timeout.', 'param': None, 'type': 'cf_gateway_timeout'}} {'Date': 'Fri, 07 Apr 2023 10:04:55 GMT', 'Content-Type': 'application/json', 'Content-Length': '92', 'Connection': 'keep-alive', 'X-Frame-Options': 'SAMEORIGIN', 'Referrer-Policy': 'same-origin', 'Cache-Control': 'private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'Expires': 'Thu, 01 Jan 1970 00:00:01 GMT', 'Server': 'cloudflare', 'CF-RAY': '7b41645cab505d3b-LIS'}

Expected behavior 🤔

not to crash but get back to the state it was

Your prompt 📝

Continue with the last settings?
Name:  blogger
Role:  ai
Goals: ['improve my blog https://eleijonmarck.dev/']
Continue (y/n): y
Using memory of type: PineconeMemory

eleijonmarck avatar Apr 07 '23 10:04 eleijonmarck

I've been getting a lot of these errors too. The longer the job run, the higher the chances of encountering adverse conditions. The app is in its early days, many running exceptions are not handled yet.

The only workaround for me was to provide only one goal, very specific. Using your example, providing one article to be improved, with perhaps one type of improvement. I could see in further work being done to fork the tasks to multiple GPT agents and improving a whole blog would mean one agent checks the articles for factuals, one improves the syntax, one improves for comprehension etc.

aosan avatar Apr 07 '23 17:04 aosan

I see, more specific and on point with a clear end goal will making it not run indefinitely. This was more of a trial and error to see if it would actually improve my overall blog

eleijonmarck avatar Apr 13 '23 11:04 eleijonmarck

This is not just for large runs. For example, I ran into the following today:

% docker-compose run auto-gpt -C /home/appuser/conf.d/reanthropize.yaml
[+] Running 1/0
 ✔ Container auto-gpt-redis-1  Running                                     0.0s 
Error creating Redis search index:  Index already exists
Using AI Settings File:  /home/appuser/conf.d/reanthropize.yaml
Using memory of type:  RedisMemory
Using Browser:  chrome
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
...
  File "/home/appuser/.local/lib/python3.10/site-packages/openai/api_requestor.py", line 682, in _interpret_response_line
    raise self.handle_error_response(
openai.error.APIError: The server had an error while processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if the error persists. (Please include the request ID 634a759e218a829ee15b5ac5400de4e6 in your message.) {
  "error": {
    "message": "The server had an error while processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if the error persists. (Please include the request ID 634a759e218a829ee15b5ac5400de4e6 in your message.)",
    "type": "server_error",
    "param": null,
    "code": null
  }
}
 500 {'error': {'message': 'The server had an error while processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if the error persists. (Please include the request ID 634a759e218a829ee15b5ac5400de4e6 in your message.)', 'type': 'server_error', 'param': None, 'code': None}} {'Date': 'Tue, 25 Apr 2023 10:17:46 GMT', 'Content-Type': 'application/json', 'Content-Length': '366', 'Connection': 'keep-alive', 'access-control-allow-origin': '*', 'openai-processing-ms': '60066', 'openai-version': '2020-10-01', 'strict-transport-security': 'max-age=15724800; includeSubDomains', 'x-ratelimit-limit-requests': '3500', 'x-ratelimit-remaining-requests': '3499', 'x-ratelimit-reset-requests': '17ms', 'x-request-id': '634a759e218a829ee15b5ac5400de4e6', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': '7bd5d519ac1b1251-ORD', 'alt-svc': 'h3=":443"; ma=86400, h3-29=":443"; ma=86400'}

If I read that 500 correctly, it seems like OpenAI is down. Fair enough that we can't do anything more if that's the case, but the application probably shouldn't crash.

idapartners avatar Apr 25 '23 10:04 idapartners

I have a similar error using y -2.

{ 'error': { 'message': 'The server had an error while processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if the error persists. (Please include the request ID 65b443fb924290ae01ed5c60013d5d00 in your message.)', 'type': 'server_error', 'param': None, 'code': None } } { 'Date': 'Tue, 25 Apr 2023 14:17:11 GMT', 'Content-Type': 'application/json', 'Content-Length': '366', 'Connection': 'keep-alive', 'access-control-allow-origin': '*', 'openai-processing-ms': '60062', 'openai-version': '2020-10-01', 'strict-transport-security': 'max-age=15724800; includeSubDomains', 'x-ratelimit-limit-requests': '3500', 'x-ratelimit-remaining-requests': '3499', 'x-ratelimit-reset-requests': '17ms', 'x-request-id': '65b443fb924290ae01ed5c60013d5d00', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': '7bd733d20a147f82-IAD', 'alt-svc': 'h3=":443"; ma=86400, h3-29=":443"; ma=86400' }

chromial avatar Apr 25 '23 14:04 chromial

Superseded by #2937

Pwuts avatar Apr 26 '23 22:04 Pwuts