WP_CRON: cURL error 7: couldn't connect to host

I've installed AutoBlog to bring in a Youtube channel feed. Auto blog gives a "WP_CRON: cURL error 7: couldn't connect to host". How can we solve this?

  • Rupok
    • Support Ninja

    Hi Jamie,

    I'm so sorry to hear the inconvenience. cURL Error 7 means, your server can't connect to the target host. So for some reason, your server can't connect to that YouTube feed server.

    Can you please talk to your host regarding this? I believe, they can give you a better idea regarding why your server can't connect to that feed. Moreover, if you could share your feed URL, we could also try from our end and check what's happening.

    Also, can you please try with a different feed URL and let us know what happens?

    I'm looking forward to hearing from you and resolving this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Jamie
    • Flash Drive

    I've had a reply from my hosts - due to me having a 'shared hosting' environment, if any script that calls to internal resources, but then tries to make external requests, it will fail.

    They have advised that I look into alternative scripts to perform the required tasks. That defeats the point of AutoBlog though doesn't it?

  • Kasia Swiderska
    • Support nomad

    Hello Jamie,

    Is it possible that your hosting provider would maybe share some more information about the problem? Because Autoblog runs without problem on different shared hostings and there is no problems with this particular error.
    I tested now the exact same feed on my site and Autoblog processed it without any issue.
    Can you tell us who is your hosting provider?

    kind regards,
    Kasia

  • Jamie
    • Flash Drive

    Hi Kasia,
    Thanks for your reply.

    The hosting provide is 123-Reg and they said the following:

    That appears to be an internal CURL request.
    By default the 123-reg shared hosting environment is limiting internal CURL requests. If you have any script that calls to internal resources on your package, but tries to then make external requests, these will fail. I'd advise you to look into alternative scripts to perform the required tasks.

    The strange thing is, I checked my AutoBlog dashboard and the posts actually fed through a couple of days ago. It was set to process every 24 hours and took 6 days before it imported anything - I hadn't touched the plugin at all since the original post. Unfortunately, it looks like a one-off as I can't get it to process again, no matter what I set as the time.

  • Jamie
    • Flash Drive

    Hi Kasia,
    I've granted access for you.

    There are currently 2 feeds in there. The second feed is the original feed which we have been discussing. The first feed was created to see if it made any difference (it also doesn't work).

    Yes you can test other feeds, hopefully you can see what the problem is.

    Kind regards,
    Jamie

  • Kasia Swiderska
    • Support nomad

    Hello Jamie,

    So I did some tests on your site that have a bit confusing results. Our autoblog uses native WordPress function fetch_feed() to get feeds and with that function I was able to pull feeds to your site (just a quick test to display them). Also using wp_remote_get() on external URL worked on your site.
    It doesn't seem server blocking anything, but yet it still throwing cURL error 7: couldn't connect to host in Autoblog.
    Can you tell me if you tried to run a quick plugin conflict test as illustrated in getting support manual (flowchart)? http://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/
    This is basic troubleshooting step, but it has to be done before we jump deeper with testing.

    kind regards,
    Kasia

  • Jamie
    • Flash Drive

    Hi Kasia,

    I've disabled all other plugins and changed the theme to TwentySeventeen, but the feed still doesn't work.

    I've come across another problem which I don't know if it's related or not. I have set up a Snapshot to backup to my GoogleDrive, however the status remains as 'Uploading' and never gets uploaded. I've run the setup a couple of times from the very beginning but I get the same result. Local backups are working fine, but not ideal.

    I was wondering if there could be any link between the two problems?

  • Kasia Swiderska
    • Support nomad

    Hello Jamie,

    I'm sorry for the late response.

    Thank you for running plugin/theme conflict test. In this case I will get one of our Second Line Support developer to check that issue to confirm what your hosting provider is saying.

    As for the Snapshot issue, I checked on your site and seems that it is working fine there. I created test backup of the database and it looks like it was uploaded.
    Can you confirm that is on your gdrive? if no, I will need you to contact our live support https://premium.wpmudev.org/live-support/ as we should keep separate threads for different issued.

    kind regards,
    Kasia

  • Jamie
    • Flash Drive

    Hi Kasia,

    The test Snapshot you created didn't work - it still says uploading (this is now almost 2 hours after you created it, and it's only a 600kb file). I'll raise this in a separate thread though.

    As for the Autoblog - the feeds went through on 10th and 11th August, but just once. It seems like it takes 3 or 4 days for it to run the first time and then never again (unless I have to wait several more days for it to run again).

    Overall, I think I may have to change my hosting. I have problems with Autoblog, Snapshot, Hummingbird, and possibly other plugins. If I'm paying the WPMU subscription for these plugins, I want to make sure they have a good environment to work in. Possibly Siteground Wordpress Hosting?

  • Kasia Swiderska
    • Support nomad

    Hello Jamie,

    Our SLS developer will check for sure if this is a hosting issue with Autoblog - and that issue with Snapshots has to be also checked before doing any decisions about changing hostings.
    I will let you know about the results of their investigation about the Autoblog.

    I'm not able to recommend particular hosting company (however I personally use Siteground for my testing sites) so before selecting any I advise to check our members forum https://premium.wpmudev.org/forums/forum/hosting where they share real live experience with different companies.

    kind regards,
    Kasia

  • Jamie
    • Flash Drive

    Hi Kasia,

    I moved over to Siteground yesterday shortly after sending my message. It's made all the difference! All the feeds from Autoblog processed immediately and kept to their schedule (I had to quickly cancel them all due to the site being live!) and also Snapshot works lightning quick and uploads straight to Google Drive without any problems.

    Thank you very much for your support through this. It was all down to the hosting - if anybody is interest, I was using the 123-reg 'Unlimited' shared hosting, and then moved to Siteground's GoGeek package.

  • Rupok
    • Support Ninja

    Hi Jamie,

    Thanks for confirming that it was a hosting issue. And really glad to see that everything is going super awesome for you now.

    Please feel free to contact us if you have any other query. We are always here to help :slight_smile:

    Have a nice day. Cheers!
    Rupok

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.