High volume breaks Rock PDF generation due to excess processes #5736
Labels
Fixed in v16.4
Status: Confirmed
It's clear what the subject of the issue is about, and what the resolution should be.
Type: Bug
Confirmed bugs or reports that are very likely to be bugs.
Description
We found this issue with one of our clients on 16.2. After a lot of testing and research we were able to identify the cause, but it is difficult to reproduce due to a high volume of people, workflows, and financial data needed. Let me explain.
Our client sent an email to a list of ~1700 people with a link to a workflow. When they click the link, it takes them to a workflow that runs the "Create Contribution Statement" action and emails them the created statement. When hundreds of people started clicking the link, the workflow began failing and reported errors with the browser. After logging into the server hosting Rock, we found this in the task manager:
That is over 500 Chromium processes. These processes built up and eventually all PDF generation failed. After investigating, here is what we found:
When an action such a Create Contribution Statement or Electronic Signature are run, a 5-6 of these Chromium processes are created and then quickly finish as the PDF is generated. However, if too many people generate PDFs at the same time, the processes do not finish, and instead build up as more people use the workflow. Eventually, when the processes soon accumulate over 500, all PDF generation fails until we could restart the server and remove them. I suspect this amount differs based on server specs.
This is happening on 16.2 but its possible its happening on earlier versions. This is the first time we have tried to generate PDFs in bulk through workflows.
Actual Behavior
After too many PDFs are generated in too quick of a time frame, all PDF generation breaks until the server is restart.
Expected Behavior
Rock should handle high volumes of PDF requests.
Steps to Reproduce
I was unable to reproduce this on demo because it requires high volumes of givers to recreate, but we were able to reproduce with a fresh install of Rock that we imported some data into. Here are the steps:
Giving Statement Request - Test_202402011502.json
Issue Confirmation
Rock Version
16.2
Client Culture Setting
en-US
The text was updated successfully, but these errors were encountered: