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

Closed
opened 2026-02-21 18:23:56 -05:00 by yindo · 10 comments
Owner

Originally created by @Gaocarri on GitHub (Feb 9, 2025).

Originally assigned to: @laipz8200, @crazywoola on GitHub.

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

Originally created by @Gaocarri on GitHub (Feb 9, 2025). Originally assigned to: @laipz8200, @crazywoola on GitHub. ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] 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](https://github.com/user-attachments/assets/8949ed6e-ccdf-417c-b215-2966d0500058) 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](https://github.com/user-attachments/assets/b9db115c-adc2-48a7-90c7-76d7baaf67ac) 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
yindo added the 🐞 buggood first issue labels 2026-02-21 18:23:56 -05:00
yindo closed this issue 2026-02-21 18:23:56 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 9, 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

@dosubot[bot] commented on GitHub (Feb 9, 2025): <!-- Answer --> I found a similar closed issue where users experienced long wait times for API responses, but no solution was found in the comments <sup>[[1]](https://github.com/langgenius/dify/issues/185)</sup>. 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 <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/getting-started/install-self-hosted/environments.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/cd135adc-5c1b-4887-8d95-7f1a8592f90d?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/cd135adc-5c1b-4887-8d95-7f1a8592f90d?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/cd135adc-5c1b-4887-8d95-7f1a8592f90d?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/cd135adc-5c1b-4887-8d95-7f1a8592f90d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/cd135adc-5c1b-4887-8d95-7f1a8592f90d?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/cd135adc-5c1b-4887-8d95-7f1a8592f90d?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Feb 9, 2025):

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?

@crazywoola commented on GitHub (Feb 9, 2025): 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?
Author
Owner

@laipz8200 commented on GitHub (Feb 10, 2025):

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 commented on GitHub (Feb 10, 2025): 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?
Author
Owner

@Gaocarri commented on GitHub (Feb 10, 2025):

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 commented on GitHub (Feb 10, 2025): > 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
Author
Owner

@Gaocarri commented on GitHub (Feb 10, 2025):

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

@Gaocarri commented on GitHub (Feb 10, 2025): > 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](https://github.com/langgenius/dify/pull/11501) used litellm, and [litellm](https://github.com/BerriAI/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
Author
Owner

@hjlarry commented on GitHub (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.

@hjlarry commented on GitHub (Feb 10, 2025): > [@laipz8200](https://github.com/laipz8200) after a simple search, i found [opik PR](https://github.com/langgenius/dify/pull/11501) used litellm, and [litellm](https://github.com/BerriAI/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.
Author
Owner

@laipz8200 commented on GitHub (Feb 10, 2025):

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

@laipz8200 commented on GitHub (Feb 10, 2025): This means we can delay the import timing of the opik SDK to avoid the fetch operation for users who don't use it.
Author
Owner

@Gaocarri commented on GitHub (Feb 10, 2025):

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

@Gaocarri commented on GitHub (Feb 10, 2025): @laipz8200 After trying, I revert this opik PR myself and found that my problem still exists ......
Author
Owner

@Gaocarri commented on GitHub (Feb 10, 2025):

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

Any other clues?

@Gaocarri commented on GitHub (Feb 10, 2025): > [@laipz8200](https://github.com/laipz8200) After trying, I revert this opik PR myself and found that my problem still exists ...... Any other clues?
Author
Owner

@crazywoola commented on GitHub (Feb 10, 2025):

@laipz8200

@crazywoola commented on GitHub (Feb 10, 2025): @laipz8200
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8102