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

Message too large using websocket #119

Open
KnoBuddy opened this issue Jul 31, 2022 · 3 comments
Open

Message too large using websocket #119

KnoBuddy opened this issue Jul 31, 2022 · 3 comments

Comments

@KnoBuddy
Copy link

I am getting this message when requesting the result from the DiscoArt service over websocket protocol. It was working until i increased the image size to 768x768.

  File "C:\Users\kyle\discoart\result.py", line 5, in <module>
    img = c.post('/result', parameters={'name_docarray': 'discobot'})
  File "C:\Users\kyle\anaconda3\envs\discoart\lib\site-packages\jina\clients\mixin.py", line 185, in post
    return run_async(
  File "C:\Users\kyle\anaconda3\envs\discoart\lib\site-packages\jina\helper.py", line 1323, in run_async
    return asyncio.run(func(*args, **kwargs))
  File "C:\Users\kyle\anaconda3\envs\discoart\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\kyle\anaconda3\envs\discoart\lib\asyncio\base_events.py", line 646, in run_until_complete
    return future.result()
  File "C:\Users\kyle\anaconda3\envs\discoart\lib\site-packages\jina\clients\mixin.py", line 176, in _get_results
    async for resp in c._get_results(*args, **kwargs):
  File "C:\Users\kyle\anaconda3\envs\discoart\lib\site-packages\jina\clients\base\websocket.py", line 188, in _get_results
    await receive_task
  File "C:\Users\kyle\anaconda3\envs\discoart\lib\site-packages\jina\clients\base\websocket.py", line 127, in _receive
    async for response in iolet.recv_message():
  File "C:\Users\kyle\anaconda3\envs\discoart\lib\site-packages\jina\clients\base\helper.py", line 202, in recv_message
    yield DataRequest(response.data)
  File "C:\Users\kyle\anaconda3\envs\discoart\lib\site-packages\jina\types\request\data.py", line 127, in __init__
    raise BadRequestType(
jina.excepts.BadRequestType: fail to construct a <class 'jina.types.request.data.DataRequest'> object from Message size 97259659 exceeds limit 4194304```
@hanxiao
Copy link
Member

hanxiao commented Jul 31, 2022

Thanks for reporting, looks like an upstream Jina issue, will transfer to Jina repo

@hanxiao hanxiao transferred this issue from jina-ai/discoart Jul 31, 2022
@KnoBuddy
Copy link
Author

Thanks for reporting, looks like an upstream Jina issue, will transfer to Jina repo

It was actually because I was not changing the name_docarray for each run as I assumed they were overwritten. Changing the name solves the issue, however is there any documentation on how to delete old docarrays from the client side, is that an implementation already within Jina I'm missing, or will I have to make my own implementation?

Thanks in advance for your help.

@hanxiao
Copy link
Member

hanxiao commented Jul 31, 2022

It was actually because I was not changing the name_docarray for each run as I assumed they were overwritten

it should be overwritten, anyway if changing the name solves the problem then it is not Jina's problem, moving ticket back to discoart

@hanxiao hanxiao transferred this issue from jina-ai/serve Jul 31, 2022
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