poshbotio / PoshBot

Powershell-based bot framework
MIT License
536 stars 108 forks source link

PoshBot disconnected from Slack after a few hours. #207

Closed IsykalMkim closed 4 years ago

IsykalMkim commented 4 years ago

Currently we have PoshBot running as a service using NSSM 2.24 on a server of ours and ever since upgrading to the latest version 0.12.0 we've been having random instances where PoshBot is no longer responsive to Slack commands, looking at Slack we notice that Posh's status is shown as being offline on Slack and so we had assumed that the service must've stopped running thus Posh is disconnected from Slack but when we check the service its still running and checking the event viewer for any crashes related to the service yielded no results. Looking at Posh's log yields no error either as to why Posh's connection to the Slack is lost either.

Expected Behavior

PoshBot is connected to Slack while the service is running.

Current Behavior

PoshBot intermittently loses connection to Slack with no logging of error as to why. The issue happens at random with no set exact time, only in interval (usually at least after a few hours from restarting the service).

Possible Solution

Our current work around is to restart the service every few hours.

PoshBot Log Output

Please note the "Disconnecting from backend chat network" is logged from when I restarted the service. PoshBot.txt

Your Environment

pauby commented 4 years ago

@IsykalMkim This sounds very much like it's related to #203 ?

IsykalMkim commented 4 years ago

Hey @pauby thank you for linking to #203 , after reading through the issue you posted it sounds very similar indeed. There seems to be some difference in our situation though as we are currently running PoshBot as a service and I believe you said that you are running it in a PS session instead. We also have high cpu usage monitoring on that server as well and its not picking up any high usage either. We're also not seeing that goodbye event in our Posh log either when Posh becomes unresponsive. I still think we are having the same issue just under different circumstances. I saw @devblackops posted in your #203 that he is working on finding a fix already so good news there. @devblackops since this sounds like a duplicate post to #203 would you like me to close this? Apologies on the duplicate post by the way if that is the case.

devblackops commented 4 years ago

@IsykalMkim This looks to be the same issue. It shouldn't matter if running in a service or session. I see the same in a container. I'm going to close this one out and track the issue in #203