Home > Database > Mysql Tutorial > body text

mysql advanced (20) CPU overload exception

黄舟
Release: 2017-02-10 11:12:01
Original
1160 people have browsed it

CPU overload exception

Problem

During the project deployment phase, CPU overload always occurs when submitting an order, causing the machine to freeze and the order submission to fail. The following figure can be seen through the task manager:

Check through the process information in the task manager (see the figure below). It can be seen that the CPU is caused by the project running. Overloaded with work. Who is the culprit? Is it because too many test statements are output? Try reducing the test output statements.

Tracing the source

After investigation, it was an error that occurred when submitting the order and executing the 3002 transaction. Run it again to see which step caused it. Is it because of the operation of the data table? Speak with facts. As shown in the figure below, when the operation order master table lm_bill is executed, the program stops running. At this time, the CPU has reached 100%!

Sure enough, execute to

SELECT * FROM lmapp.lm_addr where uid='U18353102068' AND addrid='1' limit 0,1000

Sql statement, the query result in the database at this moment is empty! And the program is always waiting! It can be seen that there is a serious loophole in your business logic!

The following error was caught:

java.sql.SQLException: Incorrect string value: '\xA2\x97\xE7\ xB2\x92' for column 'medname' at row 1

I searched for it for a long time,It turned out that I was on the Internet When writing data in the database, special characters , were added at some point, so that unexpected exceptions occurred when reading the table. Drunk too! Reference:

http://www.php.cn/

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!