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

Forcefully shutdown RPC to prevent hangs #6412

Merged

Conversation

Kowlin
Copy link
Member

@Kowlin Kowlin commented Jul 18, 2024

Description of the changes

Fixed #6391.

Have the changes in this PR been tested?

No, but it should just work. If not, its aiohttp's fault.

@github-actions github-actions bot added the Category: Core - RPC/ZMQ Related to provided (provisional) API for implementing RPC in cogs label Jul 18, 2024
@Kowlin Kowlin added the Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing. label Jul 18, 2024
Copy link
Contributor

@yamikaitou yamikaitou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it works as expected (shutdown process continues after the 120 second timeout)

Jul 19 00:02:56 redbot python[737041]: [2024-07-19 00:02:56] [INFO] red.Audio.WS.LLNode: Shutdown Lavalink WS.
Jul 19 00:02:56 redbot python[737041]: [2024-07-19 00:02:56] [INFO] red.AAA3A-cogs.Dashboard: Unloading cog...
Jul 19 00:04:57 redbot python[737041]: [2024-07-19 00:04:57] [INFO] red.main: Shutting down with exit code: 26 (RESTART)
Jul 19 00:04:57 redbot python[737041]: [2024-07-19 00:04:57] [INFO] red.main: Please wait, cleaning up a bit more
Jul 19 00:05:00 redbot systemd[1]: itazura.service: Main process exited, code=exited, status=26/n/a

@AAA3A-AAA3A
Copy link
Contributor

It works for me too! I was going to raise the subject again in #advanced-coding, fearing a problem in the way my Dashboard uses to create the websocket, but I've found this PR. ;P Thanks @Kowlin! 😃

@BenCos17
Copy link

seems to work for me also

Copy link
Member

@Jackenmen Jackenmen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably look into graceful shutdown at some point, see #4134 (review)

For now, let's just go with this, thanks!

@Jackenmen Jackenmen merged commit 699471f into Cog-Creators:V3/develop Aug 4, 2024
18 checks passed
@red-githubbot red-githubbot bot added the Changelog Entry: Pending Changelog entry for this PR hasn't been added by repo maintainers yet. label Aug 4, 2024
@Jackenmen Jackenmen deleted the pr/fix/forcefully-murder-RPC branch August 4, 2024 19:28
@Jackenmen Jackenmen added this to the 3.5.11 milestone Aug 4, 2024
BenCos17 added a commit to JARVIS-discordbot/Red-DiscordBot-jarvis that referenced this pull request Aug 4, 2024
* Set ProcessType in macOS auto-restart service to 'interactive' (Cog-Creators#6416)

* Forcefully shutdown RPC to prevent hangs (Cog-Creators#6412)

* Bump YT source plugin version to 1.5.1 and add custom plugin config (Cog-Creators#6415)

---------

Co-authored-by: Jakub Kuczys <[email protected]>
Co-authored-by: Kowlin <[email protected]>
@Jackenmen Jackenmen modified the milestones: 3.5.12, 3.5.11 Aug 4, 2024
@Jackenmen Jackenmen added Changelog Entry: Added Changelog entry for this PR has already been added to changelog PR. and removed Changelog Entry: Pending Changelog entry for this PR hasn't been added by repo maintainers yet. labels Aug 4, 2024
BenCos17 added a commit to JARVIS-discordbot/Red-DiscordBot-jarvis that referenced this pull request Aug 4, 2024
* Set ProcessType in macOS auto-restart service to 'interactive' (Cog-Creators#6416)

* Forcefully shutdown RPC to prevent hangs (Cog-Creators#6412)

* Bump YT source plugin version to 1.5.1 and add custom plugin config (Cog-Creators#6415)

* Fix unmuting when a mod isn't a mod anymore. (Cog-Creators#6411)

Co-authored-by: TrustyJAID <[email protected]>

* Bump dependencies (Cog-Creators#6417)

* Red 3.5.11 - Changelog (Cog-Creators#6418)

* Automated Crowdin downstream (Cog-Creators#6420)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Version bump to 3.5.11 (Cog-Creators#6419)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <[email protected]>

* Version bump to 3.5.12.dev1 (Cog-Creators#6421)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: Jakub Kuczys <[email protected]>
Co-authored-by: Kowlin <[email protected]>
Co-authored-by: TrustyJAID <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Dav-Git pushed a commit to Dav-Git/Red-DiscordBot that referenced this pull request Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core - RPC/ZMQ Related to provided (provisional) API for implementing RPC in cogs Changelog Entry: Added Changelog entry for this PR has already been added to changelog PR. Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RPC server shutdown hangs the bot shutdown process
5 participants