• Resolved Ian Everall

    (@ianeverall)


    Noticed yesterday morning that a few sites I work on have been running really slow. One site in particular is taking 12.5 seconds to load. Took a few hours to try and track down the problem, and I have arrived at a function within wordfence.

    wordfence/waf/bootstrap.php line 444 $event->fire(); in runCron().

    If I comment out this line as well as the reschedule function on line 445, the site takes 0.5 – 0.7 seconds to load.

    This behaviour is consistent and repeatable, if those lines are commented back in then the site takes 12 seconds to load, when removed it takes less than 1 second.

    We see exactly the same behaviour on a number of sites, this is just the worst example.

    We have tried completely removing Wordfence from the site and a fresh install after a clean with the Wordfence Assistant plugin, and the behaviour is the same.

    Is there a reason why the site would slow down like this, or why these calls are being executed on the main UI thread?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Ian Everall

    (@ianeverall)

    Could you give me an update please?

    Hi Ian, sorry for the delay. As this is not something we have seen before, one of our customer support agents will need to run this by a developer. They will get back to you as soon as possible.

    Hi Ian,
    These cron jobs shouldn’t take that long for sure, and the process itself shouldn’t be repeatable, so there is a possibility that your server connection is timing out while trying to reach out to our servers. I would appreciate if you go through these items as this will help us to narrow down this issue:
    – Check files permissions in “/wp-content/wflogs/” directory, make sure the web server can read/write to this directory, check (Wordfence > Tools => Diagnostics => Filesystem).

    – Check if the “/wp-content/wflogs/config.php” file has an updated timestamp after waiting for this 12-seconds load time happens.

    – If you have a shell access on your server, then try running this command:
    curl -D - https://noc4.wordfence.com/ and let me know the result.

    Thanks.

    Thread Starter Ian Everall

    (@ianeverall)

    Hi,

    This is now fixed!

    It was due to the /wp-content/wflogs/config.php not being writable.

    We have a rather locked down security model, obviously these files were overlooked.

    Thanks for you help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WAF runCron slowing site down’ is closed to new replies.