php - The queue is relatively large, how to handle it with multiple threads
怪我咯2017-07-04 13:46:21
0
1
981
The length of a queue is 10,000, and it takes about 2 seconds to execute a process. 10,000 items means 20,000 seconds. If you use contab to execute it every two seconds, it will take almost 6 hours to complete. Is there any way to solve it?
Why use crontab?
You can make the consumer queue program into a daemon. If one is not processed in time, several more will be created.