AppStream: Your session is taking longer than expected to prepare - fails

1

I have an on-demand fleet.

When starting as user I get the normal 2-minute start up timer.

About 10% of the time this works fine providing a streaming session. 90% of the time I get the message "Your session is taking longer than expected to prepare" Then 10% of the time after this the session starts as normal.

90% of the time when I get the "Your session..." the session appears to hang with no user message.

Looking at fleet usage it looks like the system thinks it is running but then eventually times out and user has to start over.

This has been working flawlessly for several years. I'm at a loss as to what is going on and how to proceed.

Any words of wisdom from anyone?

Thanks.

Paul

===================== editing question 1/19/22 based additional date gathering

Since initial post have been attempting to construct an example to take to support.

Here's where I am at the moment.

Summary -- 20% of login attempts result in 20-minute delay.

Any thoughts before going to support?

Thanks, Paul

===========================

See below for user view of issue and fleet view of issue.

Fleet Info...

  • Always on does not fail
  • On-demand fail rate perhaps 20% resulting in 20 minute login delay

On Demand Fleet Configuration (all defaults taken during fleet configuration)...

Instance type

stream.standard.large

Fleet type

On-demand

Stream view

App

Maximum session duration

960 Minutes

IAM role

None

Desired Capacity

1

Disconnect timeout

15 Minutes

Idle Disconnect Timeout

15 Minutes

Minimum capacity

1

Maximum capacity

5

Scale In Policies

default-scale-in:

If Capacity Utilization <= 25 % then remove 1 instance(s)

default-scale-out:

If Capacity Utilization >= 75 % then add 2 instance(s)

Scheduled Scaling Policies

Typical fail experience =================================:

User view =======:

21:04

Attempt to login, session taking longer.

Being prepared.

Taking longer.

Being prepared.

Taking longer.

Being prepared.

No streaming resources available, Retry.

Session expired, OK.

21:11

Attempt to login.

No streaming resources available, Retry.

Repeated retries.

21:23

Normal login sequence.

Session being prepared, Connecting, Application Available, Loading app settings

22:14

Logout

Fleet view ======:

Fleet Usage Log:

21:03 Actual 1 Inuse 0 Desired 1 Available 0 Pending 0

21:04 Actual 1 Inuse 1 Desired 1 Available 0 Pending 0

21:06 Actual 1 Inuse 1 Desired 3 Available 0 Pending 2

21:10 Actual 0 Inuse 0 Desired 3 Available 0 Pending 3

21:23 Actual 2 Inuse 1 Desired 3 Available 2 Pending 1

21:24 Actual 3 Inuse 1 Desired 3 Available 2 Pending 0

22:14 Actual 3 Inuse 1 Desired 3 Available 2 Pending 0

22:15 Actual 2 Inuse 0 Desired 3 Available 2 Pending 1

22:35 Actual 2 Inuse 0 Desired 1 Available 2 Pending 0

22:36 Actual 1 Inuse 0 Desired 1 Available 1 Pending 0

  • Updated question adding details in preparation for submitting to support. Your wisdom welcome. Paul

Paulv45
asked 2 years ago2731 views
3 Answers
1

Do you have app settings persistence enabled for the stack? Try disabling that. If that works, it's the downloading of that VHD that is causing the issue. Do you have a S3 VPC Endpoint Gateway and configured Route Table entries for your AS2 subnets? Did you check the resource policy assigned to the endpoint? What is the bucket policy?

AWS
EXPERT
answered 2 years ago
  • Thanks for jumping in, Stevie. Yes app setting persistence enabled. Will take a shot there next.

  • Disabling app settings persistence seemed to have no impact on situation. Next step is to see what AWS support has to say as noted by Till. Will do that and report back here -- likely after 1/5/22. Thanks. Paul

  • I got the same issue, 20% of sessions may have failed to start. When trying to disable the Application setting persistence on the stack and restart the fleet, the issue seems to be fixed.

0

Hi Paul,

we had this multiple times as well in different setups. To eliminate possible trouble sources, it would be great to tell us more about the setup.

  • Is it a domain-joined fleet? Any GPOs attached to the OU and/or user?
  • Does it work with always on enabled?
  • Did you apply any workarounds like extending the size of the VHD file?

If not - what did the AWS support say? Unfortunately the instance pool is managed by AWS so we've only limited view to the most components...

Kind regards, Till

Till
answered 2 years ago
  • Thanks for your answer/suggestions, Till. Nice to hear I'm not alone.

    • took the defaults for everything when creating so guessing not domain-joined fleet and no GPOs attached.
    • Good thought on trying always on -- will give that a whirl.
    • While have been at this for multiple years, still would be classified as newbie so don't know what extending VHD file means, but will check in to. Have not yet contacted support -- trying here to see if can get better feel for what's happening before going to support. Thanks. Paul
  • Indeed always on works flawlessly which is good but not shocking. Looking as Stevie suggestion next.

0

I have worked on this issue for several weeks with Amazon Support.
It is very challenging to duplicate the problem in any consistent way.

Amazon Support helped me understand the nature of the issue but we have not yet resolved the issue completely. There are many different tools available to understand the problem more fully and we have exercised some of these. Rather the beating our heads against the wall for a complete solution, we have developed a problem avoidance strategy I plan to use for the moment.

I am just getting started with supplying my application to my users via AppStream. I am using On-demand fleets. Following mostly fleet configuration defaults, I had set minimum capacity to 1. This is problematic in the situation we are dealing with here. I set it to 2 instead at a cost of $19/month for the extra capacity. While there is no guarantee the second instance of the stack will not have the same problem, at least it is an attempt to avoid the issue.

There are many other fleet configuration parameters such as Scale Out and Scale In Policies available and tools such as CLI to work further. I have looked at these a bit under the guidance of Amazon Support, but am not currently planning to use anything other than setting minimum capacity to 2.

Along the way I learned...

  • Logging out from a session moves the session from InUse to Pending, not to Available as you my expect.
  • Transition from Pending to Available is about 20 min. These facts were key in identifying the workaround proposed.

Using minimum 2 enables my message to users to be:

On some occasions when you attempt to login, the startup sequences appears to hang. When this happens, you will see the amazon AppStream 2.0 normal startup screen with no additional information supplied and no user interaction requested.

Workaround 1: Totally quit the browser being used. Then restart the browser and execute the normal AppStream login process. Note that opening a new tab/window in current browser session will not resolve the issue. You must totally quit the browser which will result in killing all current browser sessions.

Workaround 2: Start AppStream in a different browser (e.g. if hung in Chrome, access from Firefox instead).

Here is more detailed info from Amazon Support...

To summarize the suggested work arounds, we mentioned the following: 1.Increasing the minimum number of instances based on sage.

2.Using a scheduled scaling policy.

3.Using the Insufficient Capacity Error policy and launching instances based on alarm.

4.Clearing the browser for cache and allowing enough time for instances to move from the pending to a running state before connecting to a session.

5.Switching over to the old console and adding the auto-scaling rules again.

6.Run commands using he AWS CLI to clear the user session.

Hope others find this info helpful.

Paul

Paulv45
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions