Answer the question
In order to leave comments, you need to log in
What are common mistakes under high load and multithreading?
That is, when PHP code is executed on different servers or on one, but there are several threads:
What errors can there be in the code?
I came up with this situation: one instance of the application started and made a SELECT from the database, then, based on the data received, did an UPDATE, but between SELECT and UPDATE, another instance of the application changed the data in the database so that the data from the SELECT became irrelevant and UPDATE violated the integrity of the database. To avoid this, it is necessary to use transactions in vulnerable places?
What other situations might happen? What should be taken into account?
Answer the question
In order to leave comments, you need to log in
Read what is Select for update
A wonderful design, but in my opinion not all BDs support
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question