-
Notifications
You must be signed in to change notification settings - Fork 7
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
Email Timeouts on Request Form Submit #4551
Comments
@maxkadel and I looked at the logs on
The timing seems to correspond to the Honeybadger errors. I'm not sure this gets us much closer to a solution, but it may help us narrow in on the problem. The error happens with all 3 catalog prod VMs; no pattern there. |
Sending emails with send_later requires anything passed into the email to be a serializable object. I'm working on creating a custom serializer for the Submission object to make this work. |
@kevinreiss will follow up with @rladdusaw on the status of this ticket. |
What I got stuck on was implementing the deserializer, it requires a Patron object but there doesn't seem to be a good way to instantiate one without a User, which requires a token. I tried adding a method to get the user by netid but the test user wasn't in the database. I think adding a similar method and mocking its return value should work. The serialize method is missing some values like the bib, but that should be straightforward. The last thing I can think of is I modified one of the email methods to take a hash instead of the Submissions::Clancy object to avoid have to serialize it as well, passing it an array of error hashes. It might be better to do a serializer there as well. Any code calling that email method will need to be updated to supply the required hash. |
I created a draft PR to see the failing specs related to the branch. |
Expected behavior
When the request form is submitted the system sends one or more email messages out to the person submitting the request and staff members who process the request (this varies on the type of request).
Actual behavior
Requests that utilize APIs are still being placed correctly but emails associated with these requests can fail.
Steps to replicate
Seems to randomly happen upon form submit. Difficult to replicate.
Impact of this bug
E.g. "I can't work until this is fixed" or "I have a workaround"
Honeybadger link and code snippet, if applicable
Example: https://app.honeybadger.io/projects/54399/faults/112537713
Implementation Notes
Some months ago we tried adjusting the timeout on mail actions: https://github.com/pulibrary/orangelight/blame/d77257f966d024e8b53a01bc8329b911fb9d31ad/config/environments/production.rb#L86. We could up this, but to make this process more robust we need to move to a mail strategy that involves retrying messages that fail. This commit in pulfalight could be example to model to do that: pulibrary/pulfalight#1366.
The text was updated successfully, but these errors were encountered: