realhuseyn commented on issue #7947: URL: https://github.com/apache/incubator-devlake/issues/7947#issuecomment-2306668272
> @realhuseyn Hello there! I'm here to assist you with any bugs, questions, or contributions you might have. Let's get to work! > > I found a similar closed issue that might be relevant to your problem: [[Feature][framework] RESTful helper to support slow jira server api response by adjusting ratelimit dynamically](https://github.com/apache/incubator-devlake/issues/3756) [[1]](https://github.com/apache/incubator-devlake/issues/3756). The suggested solution involves dynamically adjusting the rate limit based on server response times. > > To address your specific issue with the timeout configuration, you can adjust the timeout settings for API requests in DevLake. The `DevlakeClient` struct includes methods to set these timeouts: > > ```go > // SetTimeout override the timeout of api requests > func (d *DevlakeClient) SetTimeout(timeout time.Duration) { > d.timeout = timeout > } > > // SetPipelineTimeout override the timeout of pipeline run success expectation > func (d *DevlakeClient) SetPipelineTimeout(timeout time.Duration) { > d.pipelineTimeout = timeout > } > ``` > > These methods allow you to customize the timeout settings as needed [[2]](https://github.com/apache/incubator-devlake/blob/main/backend/test/helper/client.go). > > Additionally, DevLake handles retries for failed API requests using both synchronous and asynchronous mechanisms. For synchronous requests, a response hook named `pause_if_too_many_requests` is used, and for asynchronous requests, the retry logic is implemented in the `ApiAsyncClient` class. This ensures that DevLake can handle retries effectively [[3]](https://github.com/apache/incubator-devlake/blob/main/backend/python/pydevlake/pydevlake/api.py)[[4]](https://github.com/apache/incubator-devlake/blob/main/backend/helpers/pluginhelper/api/api_async_client.go). > > For more detailed information on extending or customizing the timeout and retry logic for Jira, you can refer to the following documentation: > > * [Jira Rate Limit (v0.19)](https://devlake.apache.org/docs/v0.19/Configuration/Jira#fixed-rate-limit-optional) > * [Jira Rate Limit (v0.18)](https://devlake.apache.org/docs/v0.18/Configuration/Jira#fixed-rate-limit-optional) > * [Jira Rate Limit (v1.0)](https://devlake.apache.org/docs/v1.0/Configuration/Jira#fixed-rate-limit-optional) > > You can also check the `config-ui/src/plugins/register/jira/config.tsx` file in the repository for configuration options [[5]](https://github.com/apache/incubator-devlake/blob/main/config-ui/src/release/v0.19.ts)[[6]](https://github.com/apache/incubator-devlake/blob/main/config-ui/src/release/v0.18.ts)[[7]](https://github.com/apache/incubator-devlake/blob/main/config-ui/src/plugins/register/jira/config.tsx)[[8]](https://github.com/apache/incubator-devlake/blob/main/config-ui/src/release/v1.0.ts). > > _To continue talking to [Dosu](https://dosu.dev), mention @dosu._ Thank you. I increased the value of "API_TIMEOUT" environment variable and the Jira task results successfully -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@devlake.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org