Skip to content

Worker hangs sometimes #63

Open
Open

Description

@s3rius

Sometimes we fall into state, when taskiq worker hangs and doesn't react to signals like SIGTERM.

We need to fix it, since it's really annoying. Maybe we should differently work with child processes.

Activity

  1. s3rius commented on Mar 25, 2023

    @s3rius
    MemberAuthor

    I refactored process manager and since then there were no hangs.

    But I do believe that process manager can be updated, so it will react instantly to the events.

    One of the proposed solutions would be:

    1. Create a separate thread, that checks if processes are dead;
    2. Remove sleep from the main process-watcher loop;
    3. Update main loop, so it blocks until new events from the queue.
    4. Remove process checking from the main loop.

    Or we can come up with better solution.

  2. assigned and unassigned on Mar 25, 2023
  3. added this to the 1.0.0 milestone on Mar 26, 2023
  4. moved this to Todo in Taskiqon Mar 26, 2023
  5. moved this from Todo to In Progress in Taskiqon Mar 28, 2023
  6. s3rius commented on Mar 8, 2024

    @s3rius
    MemberAuthor

    Actually it's a mystery for me. Most probably it happens because workers start before singral interceptors are called. Because I only experienced it when I was sending "^C" signal before the startup sequence was complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

  • Status
    In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions