Hi,
Our app has a thread stream opened to the Twitter stream API to read in tweets that match a certain search criteria.
The issue we are facing is this thread seems to get killed after sometime, specially if the stream does not return any data for sometime on AppHarbor.
But when we run it locally, the stream remains active without the thread getting aborted.
We've coded it in such a way, if the stream is killed, the thread will re-start the stream. But on AppHarbor, this gets activated only if a user logs on to the app.
Does appHarbor kill the threads if they are inactive for sometime?
Cheers,
Sam
#1 Posted by friism Support staff on 11 Jul, 2011 07:14 PM
If your site gets no requests for 20 minutes, we'll spin down the apppool process and any attendant threads. Your could probably hack this by having the thread hit your appharbor site. It's probably not optimal to map your use-case to a thread running in the an apppool.