-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Default timeout of HttpMessageInvoker
via route configuration
#1869
Comments
Are you going to create a PR these days? |
Yes
вт, 26 дек. 2023 г., 22:40 Raman Maksimchuk ***@***.***>:
… Are you going to create a PR these days?
—
Reply to this email directly, view it on GitHub
<#1869 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCAL2WBKF3VTJ4NYWGYKMFLYLMKZRAVCNFSM6AAAAABBDLVCA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRZG4YTCNJVGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
What is the problem with default 90 seconds timeout? As a quick fix use QoS TimeoutValue property to have custom timeout value. |
👌 Great! Waiting for your PR creation... Will review with pleasure! |
I have OCR service, which process pdf file. Every request average 2mins.
When I use QuOS its random cancelled after 90 seconds (few times might be
worked).
So fo me, is only one possible solution - increase default timeout. I think
for someone it could be usefull to.
вт, 26 дек. 2023 г. в 22:52, Raman Maksimchuk ***@***.***>:
… @RightDecision2 <https://github.com/RightDecision2> commented on Dec 26
<#1869 (comment)>
👌 Great! Waiting for your PR creation... Will review with pleasure!
—
Reply to this email directly, view it on GitHub
<#1869 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCAL2WFXJGNECQP4CYTHO63YLMMGBAVCNFSM6AAAAABBDLVCA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRZG4YTMNJYGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Dear author, What's your name? |
Strange cancellation of your requests by QoS logic... You need to show this behavior by sharing to us Ocelot logs. What is the maximum processing time? Seems you have to define max value in route config. Please attach route JSON! |
I'm not sure it will help you... As we've agreed on, you are going to create a PR soon to manage default timeout from route config, right? |
Yes, when connected directly all working fine (~2minutes for every request).
Yes, would be great to manage default timeouts from config file ocelot.json
ср, 27 дек. 2023 г. в 13:03, Raman Maksimchuk ***@***.***>:
… So for me, is only one possible solution - increase default timeout. I
think for someone it could be useful to.
I'm not sure it will help you...
How stable your downstream service if you connect directly (without Ocelot
routing)?
As we've agreed on, you are going to create a PR soon to manage default
timeout from route config, right?
—
Reply to this email directly, view it on GitHub
<#1869 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCAL2WFYDB3SFQSUG77YEWDYLPP6HAVCNFSM6AAAAABBDLVCA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQGA4TKNJYGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
How is your development going? Will you contribute or not? Можешь писать на русском языке, если это ускорит нашу разработку. |
Hi Luan! This author's problem can be fixed by a Delegating Handler. public class TimeoutHandler : DelegatingHandler
{
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken token)
{
TimeSpan? timeout = TimeSpan.FromHours(1.0); // hardcoded but can be read from the config
request.Properties["RequestTimeout"] = timeout;
return await base.SendAsync(request, token);
}
} But I'm not sure on design correctness, it should be checked. And after that, just attach ConfigureServices(s => s
.AddOcelot()
.AddDelegatingHandler<TimeoutHandler>()
) and route config is {
// other props
"DelegatingHandlers": ["TimeoutHandler"]
} |
Роман, здравствуйте. Учетки не левые, создавал много лет назад. Почта
основная.
Касательно разработки, прогресса нет. Всё вызовы к службе OCR пустил пока
напрямую, минуя Ocelot. Служба читает штрихкоды с файлов pdf, иногда
занимает много времени.
Я видел, что в настройках можно использовать qos и timeout будет браться из
конфигурации, по исходниками тоже на это похоже. Но на проде все равно
иногда проскакивал timeout к службе OCR, пришлось сделать вызовы напрямую к
службам. Теперь timeout не вылетает, но в Ocelot имеется дополнительный
middleware и Consul Service Discovery.
Я вас понял. Вопрос не горит, но было бы здорово иметь такую возможность,
настройки timeout, через файл конфигурации.
чт, 22 февр. 2024 г., 22:47 Raman Maksimchuk ***@***.***>:
… @RightDecision2 <https://github.com/RightDecision2> commented on Jan 9
<#1869 (comment)>
How is your development going?
I guess you should be interested in fixing your problem...
But sorry, as a team, we are busy with other more important tasks. So, you
need to fix by your own and create a PR, if you wish to contribute.
*Will you contribute or not?*
Можешь писать на русском языке, если это ускорит нашу разработку.
Не люблю, когда скрываются под всякими анонимными никами, да ещё и
отвечают с мобилы, где установлен русскоязычный почтовый клиент.
И я задавал этот вопрос
<#1869 (comment)>
Зачем шифроваться под левой учёткой ГитХаба? Не понимаю этого! Наверняка
есть основной аккаунт, другой...
—
Reply to this email directly, view it on GitHub
<#1869 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCAL2WAERG5UB5U3Y2FFXELYU6HCJAVCNFSM6AAAAABBDLVCA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRQGA2TAMZYGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@RightDecision2 Приоритет низкий! |
I would like to do it. |
@hogwartsdeveloper Dear Zhannur, |
HttpMessageInvoker
via route configuration
Expected Behavior / New Feature
_defaultTimeout = TimeSpan.FromSeconds(_configuration.TimeOut);
Actual Behavior / Motivation for New Feature
_defaultTimeout = TimeSpan.FromSeconds(90);
In
MessageInvokerPool
:Ocelot/src/Ocelot/Requester/MessageInvokerPool.cs
Line 38 in cc8f5c5
and
Ocelot/src/Ocelot/Requester/MessageInvokerPool.cs
Lines 59 to 63 in cc8f5c5
in version 23.0
Ocelot/src/Ocelot/Requester/MessageInvokerPool.cs
Lines 9 to 12 in 7c26c07
Specifications
The text was updated successfully, but these errors were encountered: