stdray / Seq.App.Telegram

An app for Seq (http://getseq.net) that forwards messages to Telegram.
Apache License 2.0
10 stars 13 forks source link

Seq app telegram exception #14

Open AntonVMakarov opened 7 months ago

AntonVMakarov commented 7 months ago

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.gCore|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.gSendRequestAsync|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...