dify icon indicating copy to clipboard operation
dify copied to clipboard

[google] Server Unavailable Error, 504 Deadline Exceeded and Error: Minified React error #185

Open chalitbkb opened this issue 9 months ago • 5 comments

Self Checks

  • [X] This is only for bug report, if you would like to ask a quesion, please head to Discussions.
  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.6.8

Cloud or Self Hosted

Cloud

Steps to reproduce

It seems there is an issue; please check. When I use the Model Gemini-1.5-pro and the data I input into the prompt system is large, and when I begin to test debug, I receive the error message shown in the picture. image

Additional information: This problem occurs while the AI is generating responses, and as the character length increases, this error occurs.

And sometimes, this error also occurs: Error: Minified React error 185; visit https://reactjs.org/docs/error-decoder.html?invariant=185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. https://github.com/langgenius/dify/issues/3498#issue-2244025161 image

✔️ Expected Behavior

No response

❌ Actual Behavior

[google] Server Unavailable Error, 504 Deadline Exceeded

chalitbkb avatar May 09 '24 17:05 chalitbkb

To address the "Server Unavailable Error, 504 Deadline Exceeded" you're encountering with Dify version 0.6.7 and the Model Gemini-1.5-pro, consider the following steps:

  1. Reduce Input Size: Ensure your input data does not exceed the context_size limit. Using the test_get_num_tokens function can help you estimate and stay within limits.

  2. Adjust max_tokens_to_sample: Lowering this parameter can decrease processing time. The tests suggest using a value like 2048 might help.

  3. Optimize Parameters: Parameters such as temperature, top_p, and top_k can be adjusted to find a balance between quality and performance. The tests use specific values for non-streaming and streaming invocations that you might find useful as a reference.

  4. Server and Network Check: Verify the network connection and ensure your API credentials are valid. This can help avoid connectivity issues that might be causing the error.

  5. Utilize Streaming for Large Inputs: If suitable, consider using streaming to manage large inputs by breaking down the processing into manageable chunks.

  6. Increase Timeout Settings: Adjusting the timeout settings in the .env configuration file to accommodate longer processes might be necessary.

These steps are derived from insights within the Dify integration tests and configuration examples. Adjusting these aspects can help mitigate the timeout issue you're facing.

Details

Sources


About Dosu This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

dosubot[bot] avatar May 09 '24 17:05 dosubot[bot]

The same problem.Is there a solution?

shelltea avatar May 16 '24 06:05 shelltea

同样的问题,在加gamini模型,输入key就出现了;

jamser avatar May 17 '24 01:05 jamser

同样的问题,在加gamini模型,输入key就出现了;

我也是

Scenx avatar May 17 '24 09:05 Scenx

same here

mealcard avatar May 20 '24 15:05 mealcard

I have the same issue, on the" debug & preview" page, sometimes I will get this message and lose all of the generated tokens, but the logs have all generated messages.

lingfengchencn avatar Jun 25 '24 04:06 lingfengchencn