Tweet-blender causes 100's of mysql requests/second

I have been using wp tweet-blender on two of my website without trouble for several months. However, a couple of days ago my webhost complained that one site was being flooded with 'hundreds of mysql requests per second' coming from the "ws.php" script at /home/waterway/public_html/waterwaypetition.com/wp-content/plugins/tweet-blender/ path. The incident caused such a big load that it brought the whole shared server down.

We sorted that out by deactivating tweet-blender on that domain and I put it down to an aberration. However last night the other domain (which had been running tweet-blender happily since October) generated the same problem: here is an extract from the error.log:

waterway 17854 0.0 0.2 80656 6056 ? S 11:58 0:00 /usr/bin/php /home/waterway/public_html/wp-content/plugins/tweet-blender/ws.php
waterway 17855 0.0 0.2 81580 6064 ? S 11:58 0:00 /usr/bin/php /home/waterway/public_html/wp-content/plugins/tweet-blender/ws.php

Both sites are running WP 3.1.2 and the Atahualpa theme v 3.6.4. Any ideas as to what might be going wrong?
1 person has
this problem
+1
Reply
  • Will,
    this sounds very alarming. Yes, ws.php is a hard worker in my plugin - it takes cache update requests from each user of your site so if you have a high traffic site it will be experiencing high load.

    Best ways to deal with it:
    1) Turn off caching completely - under WP Admin > Settings > Tweet Blender > Archive tab
    2) Blend less sources - if you have many usernames as sources it is better to create a Twitter list and add all of them to that list, then you can use just one source (that list) and the burden on caching will be less
    3) Lower your refresh rate - cache update happens on each refresh so if your widget refreshes every 5 seconds you'll see a very high load.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly

  • Kirill, thanks for your response.

    It was alarming and most embarrassing - I'm on a shared server and the crashes brought down other sharers (twice).

    The only solution was to deactivate Tweet-Blender and I am naturally reluctant to re-activate it again. However, for the records,

    1. I don't believe I had archiving/caching switched on (unless it is on by default?)
    2. The Twitter List is an interesting idea; not one that I thought of. However, I didn't have that large a list of sources - maybe 4, maximum 5.
    3. Again, I am pretty sure that I had set the refresh rate to no faster than 20 seconds as I am covering a rather specialised subject that doesn't usually generate a lot of tweets. But that does make me wonder whether there was a surge of some sort.

    According to my webhost, the problem was caused by 'hundreds of mysql requests a second'. I wondered whether it would be worthwhile putting in a loop that would take control of such a surge before it took on tsunami proportions?

    Regards

    Will
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly

  • Hi Kirill,
    Thanks for addressing this issue. I am having some trouble with a shared host as well. Their limit is 30 concurrent MySQL connections, and it seems I'm exceeding that pretty regularly.
    I'm a little confused by your suggestion, though. There's "archiving" and then on the advanced page there's "data caching". So I just want to be clear; are you advising us to disable the "Archive page" or the "data cache"?

    Thanks!
    Mike
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly

  • Hi all- what I'm seeing is a huge bloat on my sql db – my wp_postdate table is only 8,000 rows and tweetblender is taking a whopping 19,000 rows using a single search term. Is this normal?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly

  • how to follow a list,, for username we use '@' is there anything else to folllow a list . or I just mention list name
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly