ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Twitter Timeline causing page not to load during Twitter outage?

June 22, 2012 5:37am

Subscribe [5]
  • #1 / Jun 22, 2012 5:37am

    tidy

    196 posts

    I’m using the Twitter Timeline plugin (on both EE1 and EE2 sites) and during yesterday’s Twitter outage I found that site pages using it failed to load at all.
    The plugin was usually used on the home page, so that meant that the site home page would be slow to load and eventually just show a white screen i.e. it gave the impression that the whole site was down.

    Are there particular parameters / tags I should use to ensure a more graceful failure when there is a Twitter outage?

    The typical parameters used were

    twitter_refresh="30" cache="yes" refresh="30"
    and sometimes
    use_stale_cache="yes"
  • #2 / Jun 25, 2012 3:22pm

    Shane Eckert

    7174 posts

    Hey Janine,

    I am sorry you ran into this.

    use_stale_cache=“no” should have stopped that. When the API is not reachable, this tag tells the Add-On to just sit tight and wait. Are you saying that this is not that case? If so, we may need to look into filing a bug.

    Please let me know.

    Cheers,

  • #3 / Jun 26, 2012 5:04am

    tidy

    196 posts

    Hi Shane,

    We were either not using this parameter at all (I’m not sure which value it defaults to) or were using use_stale_cache = “yes”.

    I thought the use_stale_cache parameter was about what action was taken after the api could not be reached i.e. whether to show old data cached locally or just show nothing.
    How will this parameter actually prevent the plugin hanging indefinitely waiting for the api which is what seems to have happened preventing any of the page from loading at all?

  • #4 / Jun 26, 2012 9:02am

    tigercore

    24 posts

    I have also run into this issue, however the really strange thing it that is only prevented the page from loading in Chrome. All the other browsers just didn’t display the tweets.

    I don’t understand this as it’s a server side problem.

  • #5 / Jun 26, 2012 4:55pm

    Shane Eckert

    7174 posts

    Hey all,

    Let me talk with one of the Devs and get back to you, something seems like it’s not quite right here.

    Cheers,

  • #6 / Jul 12, 2012 6:26pm

    Point B

    3 posts

    Hi Shane,

    Were you able to talk with the dev regarding this issue? We just ran into the exact same problem today. Our homepage which uses the Twitter Timeline is not loading at all starting this afternoon.

    Thank you.

  • #7 / Jul 13, 2012 1:14am

    I would really recommend that you guys push developers and add-on to ensure any external JavaScript is lazy/defer loaded.

    Google best explains why: https://developers.google.com/speed/docs/best-practices/payload#DeferLoadingJS

    We’ve been using http://labjs.com/ for our client sites for months, and while it’ll take a couple of minutes to get one’s head around it by defer loading and lazy loading scripts you’ll see *huge* speed improvements and when an external provider of JavaScript (Twitter, Google, etc) are down then it doesn’t take your site down with it.

  • #8 / Jul 13, 2012 5:37pm

    Robin Sowell

    13255 posts

    Hey all, Shane asked me to take a closer look and I can’t replicate on my end.  If I ensure the connection can’t be made, it simply outputs either nothing inside the tags or the cached data, depending on settings.  It’s definitely not a js issue- at least not natively, as the plugin doesn’t use js at all. 

    For folks how have this happening:
    1. Does the page continue to try and load forever, or is it loading fast to a blank white screen (suggests a PHP error);
    2. Everyone running the latest version - Version 1.4.5?
    3. Can anyone confirm it only happens in Chrome?  Because yes- that’s… I’d say impossible, except nothing is impossible.

    If it’s still doing it- what happens if you ftp in and delete system/expressionengine/cache/twitter_timeline_cache/ and reload?

     

  • #9 / Jul 16, 2012 4:59am

    tidy

    196 posts

    Hi Robin,
    To answer your queries:
    1. page tries to load for a good while
    2. affected sites were using a variety of versions on both EE1 and EE2 but several were running the latest plugin version 1.4.5 on EE2.
    3. it was a problem in all browsers - basically it had the effect of the site home page appearing to be down

    This was only a problem during the twitter outage in June, but I had not tried deleting the cache at the time.

    I am anxious to find a workaround for this because several sites I have built use twitter timeline and usually it’s on the home page and it’s too risky having a plugin that takes down the home page when twitter has an outage (and many people will therefore assume the whole site is down). It’s not important whether the twitter part of the page goes blank or uses stale data, I just want the page it is used on to still be available when twitter goes down.

  • #10 / Jul 16, 2012 12:41pm

    Robin Sowell

    13255 posts

    That helps a lot, tidy.  Here’s what I’ve done that I think should fix it.  I added a parameter (time_limit) so you can specify how long the plugin allows for trying to connect to twitter and retrieve data- it’s up on github now for 2.x. 

    So if the plugin gets no response in that amount of time (defaults to 5 seconds), it gives up and either serves from cache or blanks the tag. 

    Sound like that will address the problem?  Like I say- I couldn’t replicate it.  But if the page was just sitting there trying to load forever, I strongly suspect this will fix it.

  • #11 / Jul 16, 2012 12:57pm

    tidy

    196 posts

    Excellent - many thanks for this Robin! 😊 Great to have a fix for this which hopefully will prevent further trouble.

  • #12 / Jul 17, 2012 1:33pm

    Shane Eckert

    7174 posts

    Hey all,

    The amazing Robin saves the day! I love our development team.

    Is there anything else we can help with?

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases