rubyforgood / human-essentials

Human Essentials is an inventory management system for diaper, incontinence, and period-supply banks. It supports them in distributing to partners, tracking inventory, and reporting stats and analytics.
https://humanessentials.app
MIT License
471 stars 499 forks source link

Investigation of double distribution occurance #4783

Open cielf opened 1 week ago

cielf commented 1 week ago

Summary

Investigation of the issue covered in the support log at Nov 12, 2024, 11:17.

Please check into the logs and see if there are any further clues there.

We had thought this was a double-click on the distribution confirmation, but there has been a fix put in to cover off that situation.

Things to consider

No response

Criteria for Completion

Investigate and report back to the Sunday planning meeting.

dorner commented 1 week ago

I am definitely seeing multiple requests coming in at the exact same time.

This seems to be because the request timed out. I'm seeing a request taking over 48 seconds and nginx returns an error 499. I'll bet that this causes the button to re-enable and the user clicks again at that point.

We need to fix our slow queries.

EDIT: Validated that when this happens the user actually gets an error screen. They can then click back and go back to the request page and do everything again since at that point the request hasn't been fulfilled yet. That seems to be what happened.

dorner commented 1 week ago

I'm wondering if this has something to do with vacuuming - maybe it happens to be going on at that exact moment.

cielf commented 1 week ago

Noting that during the planning meeting we determined that vacuuming wasn't happening at the time of the issue.