Answer the question
In order to leave comments, you need to log in
How to find the reason for increasing execute time in PDO?
The following scheme has been implemented:
1) XML files are placed on the server for processing and writing data to the database
2) Gearman is installed on the server, to which the task for processing xml is added, at the time the new xml appears
3) Supervisord is installed on the server, which holds 10 workers, for parallel processing of the queue in several threads
All this business works wonderfully, except for one but. I have execute execution time logged in PDO to insert / update data in the database. And it is increasing. Let's say I put 80 files, the first execute script spent 0.002s. at 80 execute this time increases to 0.02.
What I tried:
1) SQL query profiling. Based on the results, we can say for sure that the query execution time does not increase.
2) PHP trace. It didn't work
3) I look suspiciously at LOCK TABLES ... WRITE in the query, but it works so fast that I'm not sure what's wrong with it. Without it, the speed is the same, only + I catch deadlocks.
It turns out that at the stage of the transition of the request from Execute to PDO to the process of executing the request to the DBMS, a plug somewhere occurs. Help, what can interfere? DBMS settings? connection settings? where else can you see and what can you read about? Thank you
Answer the question
In order to leave comments, you need to log in
Set up slow log in muscle.
View the size of the muscle cache, there is a suspicion that it has to clear / read into the cache, because it is not enough, and this greatly slows down the process.
There are no more thoughts yet, but I think there is a gap in some filling of something, since the first requests are normal.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question