question

nqd avatar image
nqd asked

Control group take to long to get request, leads to "I am not quite sure what went wrong" message

Hello,

I'm developing a smarthome with v3 api, and got error when try to control a large group. Steps to observe error below.

Step 1: I make a program to control individual device, worked well. I make a group of ~10 devices, worked well.

Step 2: Then make a group of 49 devices, the error "I am not quite sure what went wrong" appear.

Logging show that I don't have enough request, about 29 turnOff request for group of 49 devices.

Step 3: I make a fast response for turnOff request, return success response immediately.

Logging show that the interval between the first and the last request is about 6 seconds (please see log.txt)

Question: What make interval between first request and last request in group control is so large (up to 6 seconds in step 3, and > 10 seconds in step 2). How could I eliminate the "I am not quite sure what went wrong" error.

Environment:

  • "Timeout": 5,
  • "Runtime": "nodejs6.10",
  • "MemorySize": 256,

Thanks a lot in advanced.

debuggingalexa smart homedevices
log.txt (10.8 KiB)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jenn@amazon avatar image
Jenn@amazon answered

Where are you creating the program?

The number of concurrent Requests on a Lambda Function will affect the time it takes for Requests to complete. More Request = Increase in Memory usage

To mitigate the performance impact, you can increase the Memory allocation for your Function.

Check out the Best Practices for Scaling AWS for Skills blog for other tips and tricks.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

nqd avatar image
nqd answered

Thank Jenn for the information. I will check out and come back if still have problem and need your further suggestion.

Bests.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

nqd avatar image
nqd answered

Hello again,

I tried to increase mem to 1GB, and set timeout 1 minute, but still receive the same error message "I am not quite sure what went wrong". This happens event when I made fake success response to Turn On/Off request (please see the log for one request).

The log show that the first request is at 2018-02-02T10:48:40.364Z and 50th request 2018-02-02T10:48:46.849Z (6.5 seconds)

>> Where are you creating the program?

US East (N. Virginia)

>> The number of concurrent Requests on a Lambda Function will affect the time it takes for Requests to complete. More Request = Increase in Memory usage

Are you sure that mem using ~ number of requests? Doc said that mem using depends on the program only.

Any further comments?

Thanks again.somethingwentwrong.txt


10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

nqd avatar image
nqd answered

@Jenn@amazon any idea?

Thanks.

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jenn@amazon avatar image Jenn@amazon commented ·

Is this a Group created in the Alexa App? If so, what's the Group name?

What's the difference between a 'fast response' and the response that throws the error?

0 Likes 0 ·
nqd avatar image
nqd answered

Yes, the group is created in Alexa, named All lights.

The fast response for turn On request is

[
    {
      'namespace': 'Alexa.PowerController',
      'name': 'powerState',
      'value': 'ON',
      'timeOfSample': new Date(),
      'uncertaintyInMilliseconds': 500
    }
  ]

, and also for turn off with value = 'OFF'.

In the log file, you can see that I returned all responses fast (< 5ms), there is still the error message "i am not quite sure what went wrong".

Thanks in advanced.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

nqd avatar image
nqd answered

wanna ping you @Jenn@amazon again :)

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jenn@amazon avatar image Jenn@amazon commented ·

Sorry for the delay. Checking on this, need to check with the Smart Home Team.

0 Likes 0 ·