Stops working - no error messages

47 views
Skip to first unread message

hard...@recnet.com

unread,
Jul 7, 2016, 6:11:57 AM7/7/16
to Phirehose Users
I am not sure if this is a Phirehose issue or an issue with the Twitter user stream but I have noticed lately the user stream will just abruptly stop working.  No error messages, no nothing.  It just stops processing tweets and just sits idle waiting for tweets to come in.  The code in addition to the Phirehose code has been stable in the past and can run for days but now it seems to die after a few hours.  It gives the impression like nothing is coming in on the stream even though there is.     This seems to have been an epidemic in the past 2 months.

Has anyone else experienced this lately?  


Fenn Bailey

unread,
Jul 7, 2016, 6:31:54 AM7/7/16
to phireho...@googlegroups.com
Hey there!

Phirehose already has idle-detection functionality that should reconnect in cases where the stream "goes dead".

It's set to 90 seconds by default, so if the process is hanging for longer than 90 seconds, then there's something else going on.

You should be able to see what's going on by examining the logs (which will report things like idle periods).


On Thu, Jul 7, 2016 at 5:11 PM, <hard...@recnet.com> wrote:
I am not sure if this is a Phirehose issue or an issue with the Twitter user stream but I have noticed lately the user stream will just abruptly stop working.  No error messages, no nothing.  It just stops processing tweets and just sits idle waiting for tweets to come in.  The code in addition to the Phirehose code has been stable in the past and can run for days but now it seems to die after a few hours.  It gives the impression like nothing is coming in on the stream even though there is.     This seems to have been an epidemic in the past 2 months.

Has anyone else experienced this lately?  


--

---
You received this message because you are subscribed to the Google Groups "Phirehose Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phirehose-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

hard...@recnet.com

unread,
Jul 7, 2016, 2:42:35 PM7/7/16
to Phirehose Users, hard...@recnet.com
I am not seeing any error messages.  I have added a error_reporting(-1); to the code in hope that it will display messages.   It's not displaying anything.  The stream is just stopping. 

Fenn Bailey

unread,
Jul 7, 2016, 11:26:23 PM7/7/16
to phireho...@googlegroups.com
Hey hey,

Well, you should get log entries every 60 seconds regardless (see: https://github.com/fennb/phirehose/blob/master/lib/Phirehose.php#L541)

If you're not seeing that, it's nothing to do with the stream dying, there's something else going wrong with the process.

hard...@recnet.com

unread,
Jul 10, 2016, 10:18:40 PM7/10/16
to Phirehose Users
I am not seeing where these log entries are going..   I have all error reporting on and I am even watching the details from the twitter stream and I can't find any messages or any other reason why this is stopping abruptly.  It normally stays up for about 2 hours before freezing up... sometimes longer and sometimes shorter. 

This code used to work just fine and consistent.  

I have tried reducing the number of followers that the account has in order to lighten the stream.   

Do we know if Twitter may have broken something?

Thank you in advance.

=m

Karthik Murugan

unread,
Jul 12, 2016, 12:56:44 AM7/12/16
to Phirehose Users
Have you tried this in a different hosting server? I remember some hosting like Bluehost used to kill processes that run for more than few minutes.

Fenn Bailey

unread,
Jul 12, 2016, 12:59:27 AM7/12/16
to phireho...@googlegroups.com
If necessary, simply override the log function and make it print to the screen. Until you can get logging working, it's going to be very tricky to work out what's going on :)

hard...@recnet.com

unread,
Jul 13, 2016, 1:07:57 PM7/13/16
to Phirehose Users, kar...@yemkay.com
I am not using a hosting provider.  I am running CentOS 6.7, PHP 5.3.3  (which is the latest available for CentOS 6)....

=m

Darren Cook

unread,
Jul 13, 2016, 3:34:32 PM7/13/16
to phireho...@googlegroups.com
> I am not using a hosting provider.

Everyone is using a hosting provider ;-)

If you run a home server, your ISP may kill sockets that have been open
a while (and this may be a policy they just recently started; or that
they only do when there is high load, and maybe you have a new
neighbour, etc.)

But, wherever you host, it is worth spending the couple of dollars to
start up an EC2 instance (or Digital Ocean or Rackspace or Azure if you
currently use EC2) and see if it also fails from there. (*) If it does
also fail it narrows it down to being your code or your account. And if
it works fine, it is likely your ISP or your machine/config or your
internet connection, etc.

*: Remember to stop your local instance; you cannot have two streaming
instances using the same account, IIRC.

Darren
Reply all
Reply to author
Forward
0 new messages