No Results in Azure Worker Role

Feb 8, 2014 at 9:24 AM
Hi,

I am finding LinqToTwitter Streaming is working great in a unit test or console test app, but as soon as I put it into an Azure Worker Role nothing happens.

The code all runs without errors but the:
q.StartAsync(async strm =>
...

Never fires a result.

I saw these posts:
https://linqtotwitter.codeplex.com/discussions/239753
https://linqtotwitter.codeplex.com/workitem/29883

But they are with an old version of LinqToTwitter and I am not sure the ProxyUrl property even exists now.

Any ideas what could be wrong or what I could try?
Coordinator
Feb 9, 2014 at 12:03 AM
Hi,

I would first look for a potential exception. Here are a few ideas:
  1. Put a try/catch around the entire query. Since it's async, an exception will now propagate to the calling code as opposed to the old style where you needed to monitor the Exception property (no longer needed/present) in the callback.
  2. Put a try/catch inside of the StartAsync callback, just in case something strange is happening in there.
  3. Handle the AppDomain.UnhandledException event, in case LINQ to Twitter isn't handling the exception properly.
What type of stream are you using? There might be a natural delay on some streams, e.g. User where there isn't activity. You might do a small test with Sample stream, which runs continuously.

@JoeMayo
Feb 9, 2014 at 1:25 PM
Hi Joe,

Appreciate the reply.

Tried 1, 2 and 3 but still nothing and no errors.

I should have stated before, this is actually running in the Azure emulator in Visual Studio 2013 so I would expect and errors to readily immediately apparent.

This is the query:
            var q = from strm in ctx.Streaming
                    where strm.Type == StreamingType.Filter &&
                    strm.Track == "#sochi"
                    select strm;
It's the winter olympics and I know there are a load of Tweets and I have confirmed this using some custom streaming connection code. But I would like to swap to LinqToTwitter.
Coordinator
Feb 9, 2014 at 8:12 PM
Are you awaiting the StartAsync? There's a Linq2TwitterDemo_Console project with sample code.
Feb 10, 2014 at 9:14 AM
I am awaiting it yes - well I have tried both with and without.

And as I say, it works perfectly when I run the same code in a unit test (e.g. outside of Azure). It just seems to be when I run it in the Azure Worker Role emulator through VS.NET 2013 that it does nothing.