• Resolved termel

    (@munger41)


    Hi,
    I love your plugin, but this time it’s doing a very long (28s) insert on my db with the attached request.
    Any way to change that ? Is this normal ?

    28.6770 [ms]
    insert into wp_wfHits (ctime, is404, isGoogle, IP, userID, newVisit, URL, referer, UA, jsRun) values (1450461516.193525, 0, 0,
    '?????', '0', 0, 'https://xxxxxxx.com/vos-resultats/?lead_id=314&form_id=8',
    'https://xxxxxxxx.com/yyyyyyyyy/', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36
    (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36', 1);

    Thank you very much

    https://www.ads-software.com/plugins/wordfence/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author WFMattR

    (@wfmattr)

    Was this only shown once, or does it appear often?

    And did you find it in MySQL’s slow query log, or somewhere else?

    The insert is normally very fast, so the problem is probably not the query — but I have seen this happen with various simple insert or select queries when the server is extremely overloaded. For example, if there is a brute force login attack, where the requests come in faster than your server can respond, then all running process can get slowed down, including MySQL.

    -Matt R

    Thread Starter termel

    (@munger41)

    Thank you for your quick answer.
    I don’t know if the the insert is done often by your plugin, but the slow phase occurs always at the same point (submitting a form) and is always slow.
    The server is mine and does not look overloaded at all, nor bruteforce attacked.
    I found this using the BlackBox Debug plugin for wordpress.
    I am going to see mysql logs if something looks wrong
    Thank you

    Thread Starter termel

    (@munger41)

    nothing strange in mysql logs

    Plugin Author WFMattR

    (@wfmattr)

    Ok. It’s definitely not normal for that query to take that long. You could try repairing database tables, as it could indicate a broken index or some unusual issue.

    It’s also possible that the debug plugin is timing something that includes more than just the query. I’ve used the plugin Query Monitor for things like this before — it may be helpful to see if that plugin reports the same results for the same query. I’ve had minor issues with the plugin sometimes, so I don’t recommend leaving it enabled all the time though.

    You could also temporarily change the mysql server’s settings to track slow queries that are over 10 seconds. I haven’t used the slow query log much, but it can be helpful at times — most I’ve seen default to 60 seconds though, so they don’t log anything but extreme issues.

    -Matt R

    Thread Starter termel

    (@munger41)

    Thank you very much WFMattR for you help.
    The debug plugin (if you are talking about BlackBox debug bar, i used) was set just to time this long query, and didn’t change anything about the behavior, si i think it’s right. But i’ll check it.
    I am going to change mysql server setting the way you suggest, thank you very much.
    What do you mean by repairing database tables ? anything feature like this in phpmyadmin ?
    Thank you

    Plugin Author WFMattR

    (@wfmattr)

    Ok, let us know if you find anything new.

    For repairing tables, you can use phpmyadmin. By definition, repairing tables shouldn’t cause any new problems, but as always, it is best to have a good backup of the database, in case anything happens!

    To repair a table, in your table list in phpmyadmin, just select the table’s checkbox, and choose “repair table” from the drop-down menu below the table list. A sample with screenshots from one hosting company is available here.

    -Matt R

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Very long DB access’ is closed to new replies.