• Hi – I’m hoping someone can give me some advice on this. I have two sites that were recently migrated to use SSL certificates (hosting is with UK company Fasthosts). A couple of days after one site suddenly went down with 504 error – connection timeout. Logs showed it was a plug-in issue and ultimately discovered that renaming the Wordfence folder solved the problem. Same thing happened with the second site a day later. In order to activate Wordfence again I needed to rename wflogs. Sites both came back up but still keeping causing problems. I checked tools/configuration and get:

    wp_remote_post() test back to this server failed! Response was: cURL error 28: Operation timed out after 10000 milliseconds with 0 out of 0 bytes received (same information on both sites, although one of them shows 10001 milliseconds!).

    I have searched the forums but can’t seem to find anything that specifically covers this issue, i.e. the sites having connection timeouts as a result of Wordfence combined with the cURL error.

    I’d appreciate any help that can be provided on this please?! Thanks!!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hi @kezzakkc,

    You mentioned that your sites started using SSL certificates (or different ones), so I have a feeling it might be related to that.

    As a test, can I have you disable SSL verification? (Under Wordfence -> Tools -> Diagnostics)

    For example: https://i.imgur.com/O8x3pJj.png

    If it starts working again, you may need to contact your host to use an updated CA certificate, or upload your own and have your web server use it in its verification. Remember to test the new SSL certificate with SSL certification enabled.

    Dave

    Thread Starter kezzakkc

    (@kezzakkc)

    Hi Dave

    Thanks for that. I’ve disabled SSL verification and will wait and see if I get further problems. However, it is still showing the same message under “connecting back to this site”:

    wp_remote_post() test back to this server failed! Response was: cURL error 28: Operation timed out after 10002 milliseconds with 0 out of 0 bytes received

    Thread Starter kezzakkc

    (@kezzakkc)

    Hi Dave

    OK, well I’m afraid that doesn’t seem to have helped. I’ve done this on one of the sites affected and the site is still up & down. The same message is still displaying under “connecting back to the site” but in addition I’m also seeing an error that says Wordfence cannot read or write to wp-content/wflogs because file config.php doesn’t exist – but I checked and that file is definitely there! I have two other sites that have SSL and I’m getting similar problems on both of those as well – basically the sites get intermittent 504 connection timeout.

    I’d appreciate any further advice you can give me please?! Thanks ??

    Is it possible that your host is blocking outbound connections to noc1.wordfence.com?

    If you have access to the command line on your host, can you try running:

    wget https://noc1.wordfence.com and seeing if the request works?

    Thread Starter kezzakkc

    (@kezzakkc)

    Thanks for your prompt response. This is on a shared platform so I don’t have command line access, however I’ve asked the hosting company that question and also asked them to run the command. I will await their response!

    Sounds good! Let me know if you get some new information!

    Dave

    Thread Starter kezzakkc

    (@kezzakkc)

    Hi there – the hosting company say they are not blocking any outbound connections. On both of the affected sites I’ve disabled SSL verification but am still seeing the “connecting back to site message” on both, and the sites are still going down intermittently.

    I noticed that there is an SSL error log on these sites and there’s an error I’m seeing that says “RSA certificate configured for responsibletourismpartnership.org:443 does NOT include an ID which matches the server name” – I see a similar message on the other site.

    Could this be an indication of what may be causing this (SSL is applied by hosting company so we have no control over it)?

    Hi again!

    If your host is unable to connect to the Wordfence servers even after you disabled SSL verification, I think it’s not caused by the CA certificate that the hosting company applied on your servers.

    At this point, I want to see if it is caused by WordPress/Wordfence/anything else in your control or caused by the host (such as DNS settings, host blocks, system settings).

    So can you ask your hosting company to run a simple connection test to Wordfence on your host? Something like curl https://noc1.wordfence.com and see what it returns.

    Dave

    Thread Starter kezzakkc

    (@kezzakkc)

    Hi Dave

    Fasthosts provided the following:

    Resolving noc1.wordfence.com (noc1.wordfence.com)… 69.46.36.28
    Connecting to noc1.wordfence.com (noc1.wordfence.com)|69.46.36.28|:443… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 108 [application/octet-stream]
    Saving to: ‘index.html.2’

    100%[===================================================================================================================================================================================================>] 108 –.-K/s in 0s

    2018-12-30 11:09:26 (8.31 MB/s) – ‘index.html.2’ saved [108/108]

    Thread Starter kezzakkc

    (@kezzakkc)

    Hi Dave

    I just wanted to see if you’ve been able to look at this? For the moment I’ve had to disable the Wordfence plug-in on two sites because they were going up & down so frequently – since disabling Wordfence they’ve not gone down once!

    Cheers
    Kerry

    Thread Starter kezzakkc

    (@kezzakkc)

    Hi again

    I’d really like to get this sorted – are you able to provide me with any further information/guidance about how Wordfence keeps causing this issue?

    Thanks
    Regards
    Kerry

    Thread Starter kezzakkc

    (@kezzakkc)

    Dave, I’m assuming that you’re part of the Wordfence organisation and, if that’s the case, I’m rather disappointed that you now seem to be ignoring this issue especially as you were so prompt and helpful for the first few days! Am I to assume that you’ve abandoned this problem??

    Hi again,

    I have something else you can try, and I still think it’s due to connectivity.

    The test that your host ran was probably outside of the host, which allowed it to succeed.

    Can you create a file test.php, and place inside:

    <?php
    
    var_dump(
        file_get_contents(
            'https://noc1.wordfence.com/scanptest/localhost/wp-admin/admin-ajax.php',
            false,
            stream_context_create(['http' => [
                ['method'  => 'POST']
            ]])
        )
    );

    Then from your own website, go to /test.php and see what it returns?

    Dave

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Wordfence causing sites to throw 504 errors’ is closed to new replies.