I have a large PHP script that I'm triggering from a WP admin POST function. It probably takes about four or five minutes to complete, which is longer than any script I've worked with previously, so I need to take additional steps.
Right now, the POST request fails with a 504 error after about 30 seconds because it hasn't gotten any response. The triggered script continues running for a while, but is also not being completed (it worked fine locally, but is not completing on my deployment server). I probably just need to adjust my server's PHP settings or streamline my import script better.
I'm wondering if anyone has a recommendation for a general method to use to send repeated updates to the browser making the POST request and create something like a progress bar. I can imagine how that might work, but want to make sure I don't miss a useful tool and build too much from scratch.