locked
Stream Analytics stops receiving events from IOT Hub but keeps running RRS feed

  • Question

  • I Have the IOTHub as Input for stream analytics. Three different JSONS are pumped into the IOT Hub every 5 seconds.

    The query configured as below

    SELECT

         Temperature as Temperature,System.Timestamp AS CurrentTime 
    INTO
        troubleshootbloboutput1
    FROM
        troubleshootiothubinput where DeviceType =1

    SELECT
         Temperature as Temperature,System.Timestamp AS CurrentTime 
    INTO
        troubleshootbloboutput2
    FROM
        troubleshootiothubinput where DeviceType =2

    SELECT
         Temperature as Temperature, Humidity as Humidity, System.Timestamp AS CurrentTime 
    INTO
        troubleshootbloboutput3
    FROM
        troubleshootiothubinput where DeviceType =3 

    The Stream Analytics job stops receiving the events from the IOTHUb after say 1 hour or proper functioning. After that it permanently stops receiving the events.But the JOB still running. This is consistent.

    Do anyone have any insights on this.

    Saturday, October 10, 2015 6:09 AM

Answers

  • Hi,

    We have completed the validation and believe that this issue should be resolved at this point.

    Thanks,

    Kati


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, November 5, 2015 8:11 PM

All replies

  • I have exactly the same problem with 2 jobs with IoT hub inputs. They work for hours and then they stop receiving events. Then I have to stop and start the jobs. I can set the start time to the past and the jobs receive those events.
    Saturday, October 10, 2015 9:52 AM
  • The way Stream Analytics works, you will need to dedicate an IotHub ConsumerGroup to each job.  If you don't, the way IotHub works, the default consumer group will hit its max receivers and stop providing data to other jobs. 

    You can create more ConsumerGroups through the portal:
    1) go to portal.azure.com
    2) go to your IotHub
    3) click settings
    4) click messaging
    5) under consumergroups at bottom of list, add your consumerGroup(s)
    6) click save at the top
    7) go to you SAS job input and put the consumergroup name in the consumergroup field (need to stop first)


    Tuesday, October 13, 2015 4:45 PM
  • Now each job has its own consumer group. But again they stopped receiving events. Any further ideas?

    • Edited by ErikKolo Tuesday, October 13, 2015 9:24 PM
    Tuesday, October 13, 2015 9:23 PM
  • I tried using a separate Consumer group for the Job. But still the problem exist.

    Thursday, October 15, 2015 4:43 PM
  • Update: The jobs seem to "wake up" sometimes und process incoming events. But then they stop receiving events again.
    Monday, October 19, 2015 3:38 PM
  • Hi, Sreehariparamesaran and Erik

         We have investigated and understood the issue. We are working on a fix and will update the thread once the fix is ready and deployed.

    Thanks for your patience!

    Ming.


    Monday, October 26, 2015 5:46 PM
  • Hi,

    We have a candidate fix ready, and expect to have it deployed this week.

    Thank you again for your patience.

    Kati


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Monday, October 26, 2015 8:25 PM
  • Hi,

    We apologize for the delay and thank you for your patience. We have been very actively working on this issue. We have deployed a fix that we believe should solve the issue, but we are still doing final validation.  Restaring the job a this point may help resolve the issue.

    Thank you,

    Kati


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, November 3, 2015 1:04 AM
  • Hi,

    We have completed the validation and believe that this issue should be resolved at this point.

    Thanks,

    Kati


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, November 5, 2015 8:11 PM
  • Hi,

    After 3 days working my job stopped yesterday again receiving events.

    Tuesday, November 10, 2015 2:15 PM
  • My jobs also seem to stop working. But for me its after midnight on all querries which depend on dated reference data.  

    My jobs are connected to an IoT Hub through the event hub end point, each job (I have 3) has its own consumer group. Some of the queries just output raw input, and these work fine - but when it comes to the queries based on reference data - they stop working after midnight.
    The same reference file is used by all jobs and is updated 22:30 each evening and is placed in a map for the next day, e.g. referenceData/2015/11/12/referenceData.json for today was created last night at 22:30.

    I should add that the reference file is 3,5 Mb and contains 20 000 rows which would be the size in production.

    What more data can I give you guys?

    My query:

    with sqlTelemetry as (
        select 
            CAST(R.sensorGuid as nvarchar(max)) as Sensor,
            CAST([iothub321].timestamp as DATETIME) as [Timestamp],
            [iothub321].value,
            CAST([iothub321].EventProcessedUtcTime as DATETIME) as [EventProcessedUtcTime]
        FROM
            [iothub321]
        JOIN [testRef] R
            ON [iothub321].deviceId = R.deviceId
            AND [iothub321].sensor = R.sensorId
    )

    SELECT
        *
    INTO
        [telemetry]
    FROM
        [iothub321]
        
    select    
    *
    INTO
        [sqlTest]
    FROM
        [sqlTelemetry]

    select 
    *
    INTO
        [sqlInsert]
    FROM
        [sqlTelemetry]


    • Edited by Tomas Sig Thursday, November 12, 2015 7:35 AM added query
    Thursday, November 12, 2015 7:30 AM
  • It's over 2 years from the last message in this thread and I am having Stream Analytics stop after a period of time like the responses above. Any suggestions?

    Thanks

    Mike


    Mike Kiser

    Friday, April 20, 2018 5:32 PM