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

Rescue and log Net::ReadTimeout when sending oa email notifications #1018

Open
ajkiessl opened this issue Nov 4, 2024 · 7 comments
Open
Assignees
Labels
high priority Standard-OA-workflow Related to the standard OA workflow (reminder emails, waivers, OA URLs, but not files from AI)

Comments

@ajkiessl
Copy link
Contributor

ajkiessl commented Nov 4, 2024

In OpenAccessNotifier#send_notification_to_user, we rescue Net::SMTPFatalError and log it so the iterator continues to the next notification. We have, however, run into other Net errors. Specifically: ReadTimeout. This could be caused by a temporary issue with the connection to the mail server, so I think it makes sense to rescue it as well, log it, and move to the next notification.

@ajkiessl
Copy link
Contributor Author

ajkiessl commented Nov 25, 2024

We may also want to consider moving the time when these emails go out. Seems to be more common that there are network issues Sunday night. We had these emails going out Monday mornings before infrastructure changes.

@anaelizabethenriquez
Copy link
Collaborator

related to #959 (timing issue)

@anaelizabethenriquez anaelizabethenriquez added Standard-OA-workflow Related to the standard OA workflow (reminder emails, waivers, OA URLs, but not files from AI) high priority labels Nov 26, 2024
@ajkiessl
Copy link
Contributor Author

ajkiessl commented Dec 2, 2024

We also might want to look in to how large the email is that fails. It could be that there's a user with a lot of publications listed, and there's an email that times out because it takes a while to send.

@anaelizabethenriquez
Copy link
Collaborator

Interesting. If so, that would be another reason (besides usability) to address #735.

@anaelizabethenriquez
Copy link
Collaborator

In case anecdotal evidence is helpful, I checked the date on a recent reminder email sent to a very prolific researcher (4279). They typically get very long emails, so I wondered if it would have led to a time-out. However, their latest email went out November 3, when a full batch sent. Since they replied to it, I can tell you that it mentioned 8 new publications and 32 previous ones. Maybe something other than the size of the email is causing the time-out?

@ajkiessl
Copy link
Contributor Author

ajkiessl commented Dec 4, 2024

@ajkiessl
Copy link
Contributor Author

I ran the notification task in QA and it did not raise any errors. Waiting to see if the rescue code catches anything in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority Standard-OA-workflow Related to the standard OA workflow (reminder emails, waivers, OA URLs, but not files from AI)
Projects
None yet
Development

No branches or pull requests

2 participants