Thursday, April 17, 2014

Phirehose Out of memory Error while fetching data from Twitter Streaming API

Error

PHP Fatal error:  Out of memory (allocated 2835008) (tried to allocate 741616429207223 bytes) in /PATH/Phirehose.php on line 413

Solution

Use the updated Phirehose lib 1.0RC which correctly handles HTTP 1.1 Chunked Transfer, a recent change in Streaming API that took place in Jan 2014

https://github.com/fennb/phirehose/blob/master/lib/Phirehose.php
https://github.com/fennb/phirehose/blob/master/lib/OauthPhirehose.php


No comments:

Post a Comment