Project

General

Profile

Actions

Bug #769

closed

Support #761: [BE] support, investigate, fix bug prod release 2024-05-12

[BE] handle prod exceptions

Added by Trịnh Thế Định 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
Prod
Start date:
05/16/2024
Due date:
% Done:

0%

Estimated time:

Files

clipboard-202405161012-hptb5.png (62.7 KB) clipboard-202405161012-hptb5.png Trịnh Thế Định, 05/16/2024 08:43 AM
6176c576-11cb-11ef-8d13-fa284ca7da6c.log (23.3 KB) 6176c576-11cb-11ef-8d13-fa284ca7da6c.log tts-docs Trịnh Thế Định, 05/16/2024 03:54 PM
Actions #1

Updated by Trịnh Thế Định 4 months ago

Traceback (most recent call last):
  File "/app/worker.py", line 156, in main
    convert_result = await convert_and_send_result_document(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/tts_common/jobs/convert_and_send_result.py", line 86, in convert_and_send_result_document
    pieces, list_files, base_used_credits = await tts_document_extract_text_and_convert_to_speech(
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/tts_common/jobs/convert_and_send_result.py", line 325, in tts_document_extract_text_and_convert_to_speech
    characters_count, pieces = await tts_document_extract_file_content(
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/tts_common/jobs/convert_and_send_result.py", line 437, in tts_document_extract_file_content
    raise Exception(f"Content is too large, given {characters_count} / limited {settings.MAX_DOCUMENT_CHARACTER}.")
Exception: Content is too large, given 1218972 / limited 1000000.
ERROR:__main__:Traceback (most recent call last):
  File "/app/worker.py", line 156, in main
    convert_result = await convert_and_send_result_document(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/tts_common/jobs/convert_and_send_result.py", line 86, in convert_and_send_result_document
    pieces, list_files, base_used_credits = await tts_document_extract_text_and_convert_to_speech(
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/tts_common/jobs/convert_and_send_result.py", line 325, in tts_document_extract_text_and_convert_to_speech
    characters_count, pieces = await tts_document_extract_file_content(
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/tts_common/jobs/convert_and_send_result.py", line 437, in tts_document_extract_file_content
    raise Exception(f"Content is too large, given {characters_count} / limited {settings.MAX_DOCUMENT_CHARACTER}.")
Exception: Content is too large, given 1218972 / limited 1000000.
Actions #2

Updated by Trịnh Thế Định 4 months ago

INFO:app.tts_common.services.speech:Requesting openAI base_url: https://aihubmix.com/v1/
INFO:httpx:HTTP Request: POST https://aihubmix.com/v1/audio/speech "HTTP/1.1 400 Bad Request" 
ERROR:app.tts_common.services.speech:Another non-200-range status code was received
ERROR:app.tts_common.services.speech:400
ERROR:app.tts_common.services.speech:<Response [400 Bad Request]>
ERROR:app.tts_common.services.speech:{"error":{"message":"1 validation error for Request\nbody -\u003e input\n  ensure this value has at least 1 characters (type=value_error.any_str.min_length; limit_value=1) (request id: 2024051416245734340001064370401)","type":"invalid_request_error","param":"","code":null}}
ERROR:app.tts_common.services.speech:request payload: 
INFO:app.tts_common.services.speech:setup_api_key of model: gpt-3.5
INFO:app.tts_common.services.speech:random_key: ***************Qzw44b6329C566F24e129cBeBb05A99fDb1c
INFO:app.tts_common.services.speech:base_url: https://aihubmix.com/v1
INFO:app.tts_common.services.speech:count_all_active_key: 2
Actions #3

Updated by Trịnh Thế Định 4 months ago

- check log-worker exception tts-document
- check log-backend error log

Actions #5

Updated by Trịnh Thế Định 4 months ago

2024-05-16 00:05:52 [ERROR] Traceback (most recent call last):
  File "/app/app/tts_common/core/deps.py", line 40, in get_db
    yield db
fastapi.exceptions.RequestValidationError: [{'loc': ('body', 'voice_id'), 'msg': 'field required', 'type': 'value_error.missing'}]
Traceback (most recent call last):
  File "/app/app/tts_common/core/deps.py", line 40, in get_db
    yield db
fastapi.exceptions.RequestValidationError: [{'loc': ('body', 'voice_id'), 'msg': 'field required', 'type': 'value_error.missing'}]
2024-05-16 00:05:52 [ERROR] [{'loc': ('body', 'voice_id'), 'msg': 'field required', 'type': 'value_error.missing'}]
Traceback (most recent call last):
  File "/app/app/tts_common/core/deps.py", line 40, in get_db
    yield db
fastapi.exceptions.RequestValidationError: [{'loc': ('body', 'voice_id'), 'msg': 'field required', 'type': 'value_error.missing'}]
2024-05-16 00:05:53 [ERROR] Traceback (most recent call last):
  File "/app/app/tts_common/core/deps.py", line 40, in get_db
Actions #6

Updated by Trịnh Thế Định 4 months ago

[2024-05-16 00:14:43 +0900] [7] [ERROR] Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 67, in map_httpcore_exceptions
    yield
  File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 371, in handle_async_request
    resp = await self._pool.handle_async_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 216, in handle_async_request
    raise exc from None
  File "/usr/local/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 196, in handle_async_request
    response = await connection.handle_async_request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/httpcore/_async/connection.py", line 101, in handle_async_request
    return await self._connection.handle_async_request(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/httpcore/_async/http11.py", line 143, in handle_async_request
    raise exc
  File "/usr/local/lib/python3.11/site-packages/httpcore/_async/http11.py", line 113, in handle_async_request
    ) = await self._receive_response_headers(**kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/httpcore/_async/http11.py", line 186, in _receive_response_headers
    event = await self._receive_event(timeout=timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/httpcore/_async/http11.py", line 224, in _receive_event
    data = await self._network_stream.read(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 32, in read
    with map_exceptions(exc_map):
  File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.11/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc) from exc
httpcore.ReadTimeout
Actions #7

Updated by Trịnh Thế Định 4 months ago

  • Subject changed from [BE] handle exceptions to [BE] handle prod exceptions
Actions #9

Updated by Trịnh Thế Định 4 months ago

  • Status changed from New to Tested-DEV
Actions #10

Updated by Trịnh Thế Định 4 months ago

  • Status changed from Tested-DEV to Closed
Actions

Also available in: Atom PDF