Hello everyone, there are 10,000 orders in the database, and various calculations need to be performed on the orders every day. The language used is php mysql. Because so much order data was not considered in the previous design, I used a very conventional method of writing and updating all the data to the database and then returning the results. As a result, the checkout process is now stuck on that page, and it takes a long time to complete. Sometimes PHP times out and returns a blank page. Is there any way to prevent PHP from timing out?
Is it possible to divide the order into a group of 100 for processing?
How to achieve this kind of processing of a group of 100, wait a few seconds, and process the next group?
thank you all!
It is recommended to run batch calculations asynchronously in the background, store the results, and then read the results on the front end