T
T
tereh2021-11-16 13:58:00
MySQL
tereh, 2021-11-16 13:58:00

The site does not work during the execution of the script that writes to the MySQL database. How to fix?

There is someone else's script that loads data into the product catalog.
Launched 2 cores, 2 gigs on VPS with BitrixVM 7.5 (nginx, apache, mysql 5.7.35-38, php 5.6)
Site flies (old version of Opencart, not Bitrix).

Problem: Website pages do not open when the script that uploads products to the store is running.

Wherein:

  • loading static via nginx
  • php files work without accessing the database (phpinfo is instantly displayed)


In mysql> SHOW PROCESSLIST shows that one process is hanging (if you kill it, then apache does NOT open the pages of the site).
Reloading mysqld doesn't help - apache doesn't open site pages.

At this point, apache is using 25% of the CPU. And service httpd restart - does not work, hangs.
If you kill the process with apache, then everything immediately hangs (and you don’t need to kill mysqld).

The author of the script said that you need to set up hosting. But he did not give specific instructions.
I have a feeling that the tables are locked or several parallel accesses to the database are prohibited.

Please take a look at MySQL Variables on pastebin. What can be fixed there?

https://pastebin.com/VYE02kXj

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Drno, 2021-11-16
@Drno

Most likely the overload on a disk goes. Is there a way to optimize the script?
The advice with the ssd drive seems to be optimal so far. Since the CPU and RAM are not loaded to the end

L
Lazy @BojackHorseman MySQL, 2021-11-16
Tag

First you need to learn about lochki in the muscle. The topic is broad and interesting.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question