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

Exception when using app for telegram #52

Open
AntonVMakarov opened this issue Mar 29, 2024 · 1 comment
Open

Exception when using app for telegram #52

AntonVMakarov opened this issue Mar 29, 2024 · 1 comment

Comments

@AntonVMakarov
Copy link

AntonVMakarov commented Mar 29, 2024

Hi, I am using seq on Linux Ubuntu 22.04 LTS. I also use an app to send information to telegram bot. Periodically I get an exception:

Telegram.Bot.Exceptions.RequestException: Request timed out
---> System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
---> System.TimeoutException: A task was canceled.
---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Telegram.Bot.TelegramBotClient.g__SendRequestAsync|22_0[TResponse](HttpClient httpClient, HttpRequestMessage httpRequest, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Telegram.Bot.TelegramBotClient.g__SendRequestAsync|22_0[TResponse](HttpClient httpClient, HttpRequestMessage httpRequest, CancellationToken cancellationToken)
at Telegram.Bot.TelegramBotClient.MakeRequestAsync[TResponse](IRequest1 request, CancellationToken cancellationToken) at Telegram.Bot.TelegramBotClientExtensions.SendTextMessageAsync(ITelegramBotClient botClient, ChatId chatId, String text, Nullable1 parseMode, IEnumerable1 entities, Nullable1 disableWebPagePreview, Nullable1 disableNotification, Nullable1 replyToMessageId, Nullable1 allowSendingWithoutReply, IReplyMarkup replyMarkup, CancellationToken cancellationToken) at Seq.App.Telegram.TelegramReactor.OnAsync(Event1 evt) in C:\projects\seq-app-telegram\src\Seq.App.Telegram\TelegramReactor.cs:line 83
at SeqCli.Apps.Hosting.AppContainer.SendTypedEventAsync(String clef) in C:\projects\seqcli\src\SeqCli\Apps\Hosting\AppContainer.cs:line 113

Are there any ideas why this exception happens? It hangs my server and i need to reboot it every time...

@AntonVMakarov AntonVMakarov changed the title Exception whem using app for telegram Exception when using app for telegram Mar 29, 2024
@nblumhardt
Copy link
Member

Hi Anton, thanks for dropping us a line.

This looks most like an issue with the Telegram bot; I'd start over in Seq.App.Telegram and look at updating the version of the Telegram.Bot package dependency there, as well as potentially adding a retry loop (Polly?) around the line that sends the message.

If the entire server hangs I'd suspect something else going on, Seq apps run in separate processes and usually can't cause the main Seq process to fail - interested in any more details you can share, if you think that may be happening.

Best regards,
Nick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants