Error message : name lookup timed out

I receive below error:
RSS Error: WP HTTP Error: name lookup timed out

any idea?
Thanks
Giorgos

  • giorgos

    Indeed Joe, I was a bit hasty and didn't provide much details.
    The feed urls are the normal WP feed urls. e.g http://www.iphoneblogger.net/feed/
    I also tried its feedburner url with no success.
    http://feeds.feedburner.com/Iphonebloggernet

    I edited the file as per instructions and then at the dashboard it says loading... and after a while gives :
    RSS Error: WP HTTP Error: name lookup timed out

  • giorgos

    Paul, Thanks for checking. See attached the dashboard-feeds.php

    <?php
    
    /*
    Plugin Name: Dashboard Feeds
    Plugin URI: https://premium.wpmudev.org/project/dashboard-feeds
    Description: Customize the dashboard for every user in a flash with this straightforward dashboard feed replacement widget... no more WP development news or Matt's latest photo set :)
    Author: Ivan Shaovchev, Andrew Billits, Andrey Shipilov (Incsub)
    Author URI: https://premium.wpmudev.org
    Version: 1.5.2
    Network: true
    WDP ID: 15
    License: GNU General Public License (Version 2 - GPLv2)
    */
    
    /*
    Copyright 2007-2011 Incsub (http://incsub.com)
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License (Version 2 - GPLv2) as published by
    the Free Software Foundation.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
    
    /**
     * Set the widget settings after "=".
     * The settings will apply to all blogs on your network and will overwrite
     * the default and custom ones.
     *
     * @return void
     **/
    function df_set_widget_options() {
    
        $widget_options['dashboard_primary']['link']         = 'http://www.iphoneblogger.net/';
        $widget_options['dashboard_primary']['url']          = 'http://www.iphoneblogger.net/feed/';
        $widget_options['dashboard_primary']['title']        = 'WordPress Blog';
        $widget_options['dashboard_primary']['items']        = 2;
        $widget_options['dashboard_primary']['show_summary'] = true;
        $widget_options['dashboard_primary']['show_author']  = false;
        $widget_options['dashboard_primary']['show_date']    = true;
    
        $widget_options['dashboard_secondary']['link']         = 'http://planet.wordpress.org/';
        $widget_options['dashboard_secondary']['url']          = 'http://planet.wordpress.org/feed/';
        $widget_options['dashboard_secondary']['title']        = 'Other WordPress News';
        $widget_options['dashboard_secondary']['items']        = 5;
        $widget_options['dashboard_secondary']['show_summary'] = false;
        $widget_options['dashboard_secondary']['show_author']  = false;
        $widget_options['dashboard_secondary']['show_date']    = false;
    
        $current_widget_options = get_option('dashboard_widget_options');
    
        if ( $current_widget_options ) {
            //delete cache for update the widget when we change options values
            if ( $current_widget_options['dashboard_primary']['link']           != $widget_options['dashboard_primary']['link'] ||
                 $current_widget_options['dashboard_primary']['url']            != $widget_options['dashboard_primary']['url'] ||
                 $current_widget_options['dashboard_primary']['items']          != $widget_options['dashboard_primary']['items'] ||
                 $current_widget_options['dashboard_primary']['show_summary']   != $widget_options['dashboard_primary']['show_summary'] ||
                 $current_widget_options['dashboard_primary']['show_author']    != $widget_options['dashboard_primary']['show_author'] ||
                 $current_widget_options['dashboard_primary']['show_date']      != $widget_options['dashboard_primary']['show_date'] )
            {
                $cache_key = 'dash_' . md5( 'dashboard_primary' );
                delete_transient( $cache_key );
            }
            //delete cache for update the widget when we change values of options
            if ( $current_widget_options['dashboard_secondary']['link']         != $widget_options['dashboard_secondary']['link'] ||
                 $current_widget_options['dashboard_secondary']['url']          != $widget_options['dashboard_secondary']['url'] ||
                 $current_widget_options['dashboard_secondary']['items']        != $widget_options['dashboard_secondary']['items'] ||
                 $current_widget_options['dashboard_secondary']['show_summary'] != $widget_options['dashboard_secondary']['show_summary'] ||
                 $current_widget_options['dashboard_secondary']['show_author']  != $widget_options['dashboard_secondary']['show_author'] ||
                 $current_widget_options['dashboard_secondary']['show_date']    != $widget_options['dashboard_secondary']['show_date'] )
            {
                $cache_key = 'dash_' . md5( 'dashboard_secondary' );
                delete_transient( $cache_key );
            }
    
            $widget_options = array_merge( $current_widget_options, $widget_options );
        }
        update_option( 'dashboard_widget_options', $widget_options );
    
    }
    
    /* Call the function */
    df_set_widget_options();
    
    /* Update Notifications Notice */
    if ( !function_exists( 'wdp_un_check' ) ) {
        function wdp_un_check() {
            if ( !class_exists('WPMUDEV_Update_Notifications') && current_user_can('edit_users') )
                echo '<div class="error fade"><p>' . __('Please install the latest version of <a href="https://premium.wpmudev.org/project/update-notifications/" title="Download Now &raquo;">our free Update Notifications plugin</a> which helps you stay up-to-date with the most stable, secure versions of WPMU DEV themes and plugins. <a href="https://premium.wpmudev.org/wpmu-dev/update-notifications-plugin-information/">More information &raquo;</a>', 'wpmudev') . '</a></p></div>';
        }
        add_action( 'admin_notices', 'wdp_un_check', 5 );
        add_action( 'network_admin_notices', 'wdp_un_check', 5 );
    }
    
    ?>
  • Paul

    giorgos, I received your inline PHP post.

    Looks the same as mine. I had just wanted to be sure. After looking at the plugin I'm not sure we have many options here. The plugin does not itself make the RSS call to the remote server. Instead the plugin just sets up the dashboard widget and tells WordPress the URL of the feed. Then when the page loads WP will access the remote feed via the provided URL. For some reason the server is just not being seen in a timely manor. I'm still investigating the internal WordPress process to see if we can intercept a timeout of something.

    I'm assuming you have tried other feed URL via your setup just to make sure this works via your server?

  • Paul

    Try adding the following to your dashboard-feeds.php file. This will override the short timeout on accessing the remote site.

    function df_filter_http_request_timeout($current_timeout) {
    if (intval($current_timeout) < 60)
    return intval(60);
    else
    return intval($current_timeout);
    }
    add_filter( 'http_request_timeout', 'df_filter_http_request_timeout');

    Also, from what I'm finding out the WordPress uses very long caching timeouts. Meaning even though you see that error 'WP HTTP Error: Connection time-out' it will not automatically refresh on loading the dashboard page. What is does it just keep showing the error instead of trying to pull a valid feed. The default timeout is something like 12 hours.

    So what you need to do is delete the cached feeds. To do this look for the following 2 lines in your dashboard-feeds.php

    $cache_key = 'dash_' . md5( 'dashboard_primary' );
    delete_transient( $cache_key );

    Copy these 2 lines to be the fist lines within 'df_set_widget_options'. I can't tell from your inline PHP code which lines there are exactly. Here is the PHP code with all changes via past bin http://pastebin.com/VKWuu5Zn

  • giorgos

    Paul, I used your pastebin modified code, but it didn't change anything.
    RSS Error: WP HTTP Error: name lookup timed out

    If I replace my feed url to something else, lets say https://premium.wpmudev.org/feed/ then everything works fine.

    As I use a reverse proxy service and as there are currently some intermittent DNS issues pointing to the original server it might be the reason of the time out.. but again thats a long shot..

    other than that it might be another plugin, feedproxy, buddypress, multisite settings, etc, etc..

    Really weird situation and really appreciate your efforts on troubleshooting this.
    But at this point it looks like a dead end.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.