Home  >  Article  >  Backend Development  >  How to avoid deadlock problems in your application? _PHP Tutorial

How to avoid deadlock problems in your application? _PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 17:01:151167browse

An unavoidable feature of any lock-based concurrency system is that under certain conditions the system may block. When one connection holds a lock and another connection attempts to change the lock's state, the second connection either waits for the first connection to release the lock, or is blocked as a result.
In order to obtain the best scalability, performance and concurrency, when designing applications and query statements, attention should be paid to shortening the length of transactions and reducing the time of lock ownership. Most concurrency problems tend to occur during the design phase of applications and databases, so it is crucial to fully consider this factor during the design phase.
Otherwise, the application will have potential bugs that will usually not be discovered until application scalability testing.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631169.htmlTechArticleAn inevitable feature of any lock-based concurrency system is that the system may block under certain conditions. When one connection holds a lock and another connection attempts to change the lock's state,...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn