PHP stream and timeout?


Currently I have a successful API access using the football example and it works like a charm. I am able to collect and display the data I need. the one issue i have is the keepalive of the stream. There are warnings about consumption which i can adjust for, but the PHP script/API I am using has a few restrictions I am trying to work around. the data stream I am collecting needs to remain persistent for hours at a time, but it appears that PHP either server side, or in broswer settings have a timeout value that I have been unable to supoercede.

when not outputting data to the browser I get an "500 internal server error), I presume due to browser timeout.

When outputting the basic data on the browser to keep the session active it fairly reliably times out after 45 minutes of activity.

Is there a way to keep the PHP API access running for an extended time without interruption (aside from standard API reported errors)?

Any help would be apprecaited. I have tried the following:

  1. No browser output and a 30 minute "header refresh" in the PHP results in a timeout on browser after 5 min., but script runs for 20 min. in background anyway
  2. triggered javascript output to the page to reload the window Javascript never executes because the page is still "loading" while accessing the APi stream, no joy.
  3. Output simple data to the broswer (i.e. '...') when "onInteraction" triggers this keeps the browser active but times out after 45 minutes

Thank you,

Silver Tiger


Although it is entirely possible to run the PHP Client Library from the browser, we have seen similar problems to this in the past. If you are looking to stream interactions straight to the browser, rather than store and post-process them, the best solution would be to use something like our Node JS Client Library.

If you would like to submit a report to our support helpdesk (including your DataSift username), we would be able to take a look at our logs to see if there were any issues on our side.