• Title pretty much says it all. If I add the widget to my site, it often takes 10+ seconds to load, and sometimes the widget shows this:

    WP Strava ERROR cURL error 28: Resolving timed out after 10000 milliseconds

    I guess the solution is to render the widget first, and then attempt to do DNS lookups and other things asynchronously, in the background. Much like what Disqus does. This needs to be non-blocking. Until then, I have to disable this plugin. Now my pages load within 1 second, consistently.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author jrfoell

    (@jrfoell)

    @bviktor thanks for your report. Please help me with some more detail. You were able to authenticate your strava account/app, but you’re now unable to display a widget? Let me know which widget.

    If you can, please add define( 'WPSTRAVA_DEBUG', true ); to your wp-config.php file, re-try, and paste the resulting error here. I’m working on this plugin today if you can provide this information.

    At a glance, that error means your web server timed out (after 10 seconds) while looking up the domain name for strava.com – it wasn’t even able to contact their service for any information. In a normal situation it will call the Strava API and cache the results, so after your initial request, you page load should be back to the normal < 1 second load time.

    Rather than raising the timeout for the DNS lookup, is it possible for you to open an SSH connection to your webhost and run nslookup www.strava.com or dig www.strava.com and also paste that output here?

    Thread Starter bviktor

    (@bviktor)

    I have no problem adding the widget. Most of the time it displays the workouts properly.

    The problem I’m reporting is that the plugin blocks rendering the site until the lookup is finished. This results in increased load time (up to +30 seconds according to API.php), and sometimes even then results in failure.

    To mitigate this, the plugin should render just a placeholder widget and run the queries in the background, and update the widget with actual data once obtained. This is what Disqus does, the “number of comments” are always updated after the site is already rendered.

    Also, if lookups fail, it should retry that once or twice before giving up completely.

    Plugin Author jrfoell

    (@jrfoell)

    Thanks @bviktor – so the plugin will currently cache the widget data results for one hour. I can look into making the cache longer, or even configurable, but I set it to an hour so people aren’t wondering why their activity isn’t showing up, while at the same time minimizing the number of requests to the Strava API.

    As far as loading the activity data after the page is loaded, that is just not how the plugin works currently. While it may transition to work that way in the future, it is a relatively large undertaking.

    If you’re willing, I’m interested in helping you troubleshoot the problem as it sounds like there are underlying connection issues from your web host to the Strava API – which should definitely not be the case. Let me know if you’re able to execute some of the troubleshooting requests I outlined above.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin block page load, often gives “cURL error 28: Resolving timed out”’ is closed to new replies.