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

api service sometimes waits for a long time, may be related to calling github? #13454

Closed
5 tasks done
Gaocarri opened this issue Feb 10, 2025 · 10 comments
Closed
5 tasks done
Assignees
Labels
🐞 bug Something isn't working good first issue Good first issue for newcomers

Comments

@Gaocarri
Copy link
Contributor

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.0、0.15.1、0.15.2、0.15.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

After upgrade to 0.15 from 0.14, api service sometimes waits for a long time or failed.
I found api service will get https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json,because of my server's network, it is not stable to get raw.githubusercontent.com. I haven't confirmed in detail what it does.

ping result:
Image

I'm not sure if it's related to this issu. If so, i think direct access to github is unreasonable, is there any solution?

✔️ Expected Behavior

Api service can be accessed normally

❌ Actual Behavior

Api service sometimes wait for a long time, unstable

@dosubot dosubot bot added the 🐞 bug Something isn't working label Feb 10, 2025
Copy link

dosubot bot commented Feb 10, 2025

I found a similar closed issue where users experienced long wait times for API responses, but no solution was found in the comments [1].

Regarding your concern about accessing raw.githubusercontent.com, Dify does not provide specific configuration options to change or disable access to external URLs like GitHub. However, you can consider setting up a local proxy or caching mechanism to improve network stability when accessing external resources. Additionally, you might want to check your network settings and ensure that your server has a stable connection to external resources.

If the issue persists, you might want to explore network-related settings and optimizations documented in Dify's configuration or setup guides, such as adjusting timeouts or configuring proxies [2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@crazywoola
Copy link
Member

This service should be triggered when import the DSL from the github repo. Can you confirm that when other endpoint will not be affected when this is not called?

@laipz8200
Copy link
Member

We don't have any code to fetch https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json, could you provider more detail about this URL?

@Gaocarri
Copy link
Contributor Author

We don't have any code to fetch https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json, could you provider more detail about this URL?

That being said, this is imported by me (^_^;)? I don't remember when it was imported,
I'll to find it

@Gaocarri
Copy link
Contributor Author

We don't have any code to fetch https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json, could you provider more detail about this URL?

@laipz8200
after a simple search, i found opik PR used litellm, and litellm provide this file: https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json

I'm still not sure how it works and if my problem is related to this file,i will try it myself

@hjlarry
Copy link
Contributor

hjlarry commented Feb 10, 2025

@laipz8200 after a simple search, i found opik PR used litellm, and litellm provide this file: https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json

I'm still not sure how it works and if my problem is related to this file,i will try it myself

You're correct; this URL fetch happens every time I restart my local service.

@laipz8200
Copy link
Member

This means we can delay the import timing of the opik SDK to avoid the fetch operation for users who don't use it.

@Gaocarri
Copy link
Contributor Author

@laipz8200
After trying, I revert this opik PR myself and found that my problem still exists ......

@Gaocarri
Copy link
Contributor Author

@laipz8200 After trying, I revert this opik PR myself and found that my problem still exists ......

Any other clues?

@crazywoola crazywoola added the good first issue Good first issue for newcomers label Feb 10, 2025
@crazywoola
Copy link
Member

@laipz8200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working good first issue Good first issue for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants