node-facebook-client icon indicating copy to clipboard operation
node-facebook-client copied to clipboard

Large amount of timeouts over time

Open dominiek opened this issue 13 years ago • 1 comments

Hi, we are using this module for a lot of users on our production server. After running the nodes for a while we are experiencing a lot of timeouts, even when increasing the timeout to 20 seconds.

We've been investigating this problem for some time but still have not found the culprit. We've had several hypotheses that we have not disproved to be the problem.

  • We thought the request.on('close') event could be called earlier than the 'end' event. This is not the case.
  • We thought that perhaps sockets were not closed properly, leaving a big pile of open connections. This is not the case.

Is anyone experiencing a similar problem?

dominiek avatar Feb 27 '12 10:02 dominiek

Hi! @beatlevic had a similar problem in #15.

Which nodejs version are you using? Have you monitored the memory usage of the nodejs app? Maybe we are running into a memory or something like that. Does it break after a specific amount of requests?

I will have a look at the https://github.com/DracoBlue/node-facebook-client/blob/master/lib/facebook-client/FacebookClient.js#L18 doRequest method, since I expect this one to be the cause of the issue.

Maybe we need some function which tells us the general stats (how many sessions, how many requests and so on) to query the nodejs server as soon as the heavy timeouts happen in your case.

DracoBlue avatar Feb 27 '12 10:02 DracoBlue