Almost all requests containing SQL commands are sent to a website at the same time, so that phpupdate1 has tens of thousands of data records. will php be suspended? Will it be processed one by one? Do I need to use a queue? What is the significance of using it? Almost all requests containing SQL commands are sent to a specific website at the same time, so that php update1 has tens of thousands of data records. will php be suspended? Will it be processed one by one?
Do I need to use a queue? What is the significance of using it?
Reply content:
Almost all requests containing SQL commands are sent to a specific website at the same time, so that php update1 has tens of thousands of data records. will php be suspended? Will it be processed one by one?
Do I need to use a queue? What is the significance of using it?
Several servers
Concurrency
First, requests will not generate fpm. for details, refer to the fpm configuration, which has the maximum number of processes. The subsequent requests are discarded, and the error 502 is returned. should this be common?
Even if you have a resource that can accommodate processes, PHP is still running very fast, that is, it takes only a long time to initialize, and the logic processing will soon end. link to mysql, can mysql accommodate 1 million connections at the same time? An SQL error is returned.
PHP and mysql are supported, so there is nothing to say and it will certainly not be paralyzed.
Based on your server resources (one server), we recommend that you use the queue mode. it is best to use the Singleton mode, which will not affect other services too much.
If the queue is used, it can be optimized. If all the data in one million requests is obtained and merged, can all the data be updated at a time? How many times (less than 1 W) can it be merged?