Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Timing out today #2

Closed
boutell opened this Issue · 6 comments

2 participants

@boutell

I've run the "mocha rest" tests in the tests folder with valid credentials, and it just hangs and eventually times out. I'm not finding any indications of problems on Twitter's end. But absolutely no love for mtwitter today. I wonder if they got stricter about something today?

@boutell

Here's a data point: simple-twitter, a generally not as complete but distinct implementation of the twitter API also available in npm, is still working today. https://npmjs.org/package/simple-twitter

@passcod
Owner

It works here. Does this still happen on your end?

@boutell
@passcod
Owner

If you go in the tests and increase or even remove the timeouts, it might help. I run the tests on "clean" credentials (so there's zero rate limits, zero interference from other apps), and from a fairly well-connected box, and I set timeouts mostly because otherwise Travis CI just timeouts the entire thing if one GET test takes a long time (and we want the rest of the results, too, right?).

The way mtwitter works, if it re-queues the requests they'll generally run minutes or more later, thus blowing out of the timeouts. Regarding other libraries:

  • If you care about getting the content, no matter what time it takes, that how mtwitter is designed. (It's not fully there yet, though.)
  • If you prefer to not get some content, and have the library get back to you (e.g. with an error) as soon as possible, you should either use other libraries, or specify the queue: false option.
@boutell
@passcod
Owner

failing pretty quickly (a few seconds).

The timeouts are set to 10s per test, and here requests complete within about half that.

@passcod passcod closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.