Sidekiq 100% CPU usage and no mails

AI 生成的摘要

The discussion addresses a technical issue where Sidekiq consumes 100% CPU usage and fails to process incoming emails, causing the system to stop pulling new mail until a reboot. GregoryS reports that emails are not linked to conversations and appear in /admin/email/received with missing data, while jobs like Jobs::PollMailbox remain stuck in QUEUED or RUNNING states. gerhard requests a sample email, and after receiving it, identifies the issue as resolved by a fix in the email_reply_trimmer. GregoryS confirms the problem no longer occurs after applying the fix.

Hey, we currently experience the following problem:

  1. Someone tries to forward a mail to one of our user-defined mails for incoming mails.
    Now two things can happen:

  2. a) This mail never reaches the inbox of the group. It is shown under /admin/email/received but not linked to a conversation. When I try to recover the mail via the Data Explorer (see query below), most of the fields (topic, post, error, cc_addresses, rejection_message) are NULL. The mail is not shown under /admin/email/rejected.

    SELECT *
    FROM incoming_emails
    WHERE id = 796
    

    b) The CPU-usage of Sidekiq on the server reaches 100% but still says [0 of 5 busy] in htop.
    Furthermore the status of our jobs changes to QUEUED and sometimes the job Jobs::PollMailbox to RUNNING.

    Now when this happens, discourse completely stops to pull new mails until we reboot the server.

Could you send me the raw email that is failing via PM? We will look into it.

Thanks for providing a sample email.
This should be fixed by

Thank you!
We tested it again and can confirm that the problem did not occur anymore.