department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
78 stars 59 forks source link

SL Tugboat: Saving VAMC Facility Health services takes about a minute #17965

Closed laflannery closed 2 weeks ago

laflannery commented 2 weeks ago

Description

On the SL integration branch, I was testing and tried to save a VAMC Facility health service but when I did it took a solid minute to save. There were no error that I saw and Christian also looked but saw some JS errors related to alerts. His suggestion was to see if this still persisted after a rebase which is why I made this ticket, so we can remember to test this after the rebase

Acceptance Criteria

omahane commented 2 weeks ago

post_api_queue was >13,000 items

On node save, a VAMC facility service is added to the post_api_queue, after it checks the queue to see if the item it is about to add it is a duplicate of an already added item. On Tugboat, there's no cron running to process the queue. Therefore, this keeps growing and growing. After the migration of services data into Service locations in the SL integration branch, we have >13000 items. Thus, every additional save took longer and longer and added one more item to the queue.

Notably, other services are not added to the queue, even those that use the Service location paragraph. As a result, we were not seeing the same slowness with those node save operations.

Screenshot 2024-04-25 at 16 43 50

Action

I ran a delete command in the Tugboat terminal: drush queue:delete post_api_queue

Then, I tried to save a VAMC facility service. It was much faster.