Wednesday, December 11, 2013

User might experince delay when join Lync Online Meeting.

Recently I’ve worked with large enterprise customer on troubleshooting strange issue with Lync Meeting join. Users from the pilot (50 people) group would report prolonged (up to 30 seconds) delay between the splash screen and the actual Lync Meeting join. A pattern was not observed (although there is one, just not obvious at first) – it would happen to random users, at random time, joining different meeting ID’s on different pools.

In this article I will explain the background of the “issue” and describe possible solution.

When user click Lync meeting link in format https://meet.contoso.com/user/M33T1NG1D , the request is processed by Director Pool member (if Simple URL points to Director), where after Meeting Discovery, Director Web Service will respond with “301 Moved permanently” to the original request. Client then sends new GET request with destination Web Service of the pool where the meeting will be hosted and meeting join completes.

As Lync server is installed on Windows Server, HTTP requests are served by Internet Information Services (IIS). The web sites (Internal or External) and Virtual Directories within the sites are driven by IIS Worker Process and are logically defined within IIS Application Pools.



As we see, not only whole Web sites (Internal or External), but also Virtual Directory within a web site might be configured to run under dedicated Application Pool.

One aspect of IIS Application Pool is “Recycling”. This process is defined in TechNet as “Internet Information Services (IIS) application pools can be periodically recycled to avoid unstable states that can lead to application crashes, hangs, or memory leaks.” When we install Lync server components, a default value is configured - 1740 minutes (29 hours).




When the Application Pool recycles, all items in the memory are released, a new w3wp process is created, configuration read and applied, .NET reloaded and we site is back serving requests. Under normal circumstances, had we had a request for simple web page as https://dialin.contoso.com , user would not experience visible delay because there is no complexity in assembling and serving this page.

However, Meeting Join request requires extensive server side processing, not discussed in this article. In reality, it takes about 22 seconds for the very first meeting join request to be served after Application Pool Recycle. This fact might cause inconvenience under certain circumstances – in my case a very large front end pool (nine pool members) and only 50 pilot users on this pool. Because the pool web services are Hardware Load Balanced, there is great chance that unique user would hit pool member where the Application Pool was just recycled and expertise 22+ seconds delay. Reports of type “It took forever to join the meeting this morning” were pouring in and frustration was growing fast.

The solution to eliminate the delay is rather simple – monitor the System Event Log for EventID 5074, examine the event description for which Application Pool was just recycled, and fire up Scheduled Task to execute PS script which will simulate real meeting join request. The request will perform “Application Pool warm-up” and because we do so immediately after recycle even, chances a real life user to attempt to join after Pool Recycling, but prior to Scheduled Task execution is practically non-existent.



Steps to configure Application Pool meeting join warm-up:
  

Step 1: Create folder “Scripts” on C:\
  • Inside this folder, create text file MeetExtWarUp.txt
  • The file should contain single line Invoke-WebRequest https://FE_Server_FQDN:4443/Meet?key=A1B2C3D4 where FE_Server_FQDN is the FQDN of your SE or EE Lync front end server.
  • Rename the file to MeetExtWarUp.ps1
  • Follow the steps above to create second .ps1 file where the text is 
    Invoke-WebRequest https://FE_Server_FQDN/Meet?key=A1B2C3D4
***Note that we use “:4443” for the External Web Site. It will be omitted in the file used for the Internal Web Site.


Step 2: Create Scheduled Task to execute the .ps1 script when AppPool recycle event is detected.

  • Start Task Manager as Administrator
  • Expand Microsoft/Windows node, right click and select "Create Task"



  • Name the task (WarmInternalAppPool in this example)
  • Check "Run with highest privileges"
  • Click "Change User or Group" button and select SYSTEM, then click OK.




  • Select "Triggers" tab.
  • Click "New"
  • In the "New Trigger" window, select "On an event" from "Begin the task:"
  • Toggle "Custom" under Settings
  • Click "New Event Filter" button



  • In New Event Filter window, click XML tab.
  • Check "Edit Query manually" check box
  • paste the following Query, where pay attention on the string describing which AppPool we want to use as trigger. For the Internal Web Site, we use LyncIntFeature and for External - LyncExtFeature.

<QueryList> <Query Id="0" Path="System"> <Select Path="System"> *[System[Provider[@Name='Microsoft-Windows-WAS'] and (EventID=5074)]] and *[EventData[Data[@Name='AppPoolID'] and (Data='LyncIntFeature')]] </Select> </Query> </QueryList>

  • Click OK on this window.
  • Click "Action" tab.
  • Click "New"
  • Type powershell.exe in "Program/script" box.
  • Add the following in "Add adgument (Optional):" box -ExecutionPolicy Unrestricted c:\Scripts\MeetExtWarmUp.ps1 where MeetXXXWarmUp.ps1 is the the name of the script we prepared earlier for the appropriate AppPool.



Complete the setup. your final configuration will look similar to mine.


What we just configured:

  1. Monitor the System Event Log for EventID 5074 (indicating AppPool recycle event"
  2. Examine the event to determine which AppPool was just now recycled
  3. Fire up the appropriate PowerShell script to sent fake meeting join request, thus forcing the server perform Meeting Join procedure (the server is not aware this is not a real meeting ID)

Step 3: Verify if our scheduled task works as expected.

Upon scheduled AppPool recycle, we find the corresponding entries as shown


Also, when examine the IIS log, we expect to see appropriate entries, indicating the meeting join request was invoked and precessed.


In conclusion, it is possible to "warm-up" the app pool of Lync Server Web Site to avoid meeting join delay.

This article can also be used as reference as of how to capture and evaluate specific event and execute Scheduled Task based on the input.

41 comments:

Mark Poulton said...

Thanks for the post. I took your idea and made a more generic script. Should work. Basically I wanted a batch file I could run that would automagically generate the FQDN since I tend to deploy large pools.

@echo off

REM
REM Determing the domain the compmuter is in
REM

FOR /F "tokens=1* delims=REG_SZ " %%A IN ('REG QUERY HKLM\System\CurrentControlSet\Services\Tcpip\Parameters /v Domain') DO (SET CURR_DOMAIN=%%B)

REM
REM Converting domain to upper case curr_domain
REM

IF [%curr_domain%]==[] goto huh
SET curr_domain=%curr_domain:a=A%
SET curr_domain=%curr_domain:b=B%
SET curr_domain=%curr_domain:c=C%
SET curr_domain=%curr_domain:d=D%
SET curr_domain=%curr_domain:e=E%
SET curr_domain=%curr_domain:f=F%
SET curr_domain=%curr_domain:g=G%
SET curr_domain=%curr_domain:h=H%
SET curr_domain=%curr_domain:i=I%
SET curr_domain=%curr_domain:j=J%
SET curr_domain=%curr_domain:k=K%
SET curr_domain=%curr_domain:l=L%
SET curr_domain=%curr_domain:m=M%
SET curr_domain=%curr_domain:n=N%
SET curr_domain=%curr_domain:o=O%
SET curr_domain=%curr_domain:p=P%
SET curr_domain=%curr_domain:q=Q%
SET curr_domain=%curr_domain:r=R%
SET curr_domain=%curr_domain:s=S%
SET curr_domain=%curr_domain:t=T%
SET curr_domain=%curr_domain:u=U%
SET curr_domain=%curr_domain:v=V%
SET curr_domain=%curr_domain:w=W%
SET curr_domain=%curr_domain:x=X%
SET curr_domain=%curr_domain:y=Y%
SET curr_domain=%curr_domain:z=Z%


echo.
echo Computer Name: %computername%
echo.
echo Current Domain: %curr_domain%
echo.
echo.

choice /t 1 /n /d y


PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Invoke-WebRequest https://%computername%.%curr_domain%:4443/Meet?key=A1B2C3D4}"

rem PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Invoke-WebRequest https://%computername%.%curr_domain%:443/Meet?key=A1B2C3D4}"


rem choice /t 60 /n /d y

Oliver Maurice said...

You should also visit this blog for some information about homework and how it was originated. Its pretty interesting and funny article and I think you will be impressed on how thing turned out.

norhan said...

مكافحة حشرات بالخبر افضل شركة مكافحة حشرات بالخبر
مكافحة حشرات بمكة افضل شركة رش حشرات بمكة
مكافحة حشرات بالمدينة المنورة افضل شركة رش حشرات بالمدينة المنورة
مكافحة حشرات بالدمام افضل شركة مكافحة حشرات بالدمام

Lilly said...

We are here for a significant time frame and give the best finance assignment help to the students.

Casestudysamples said...

Aside from conveying outstanding work, we have ensures that buy case study stand apart from the rest. We can show you how the conditions and your own mentality impact your presentation and show you what to do to improve as student.

Anonymous said...

Are you facing login problems with your PayPal login account? If yes! Then refer to the solutions that are mentioned below. paypal-prepaid.com login
So, stay with us. We are a self-dependent technical help service provider for Computer and other devices related issues. Our experienced & certified experts are available 24*7 for you. Our technicians will be always there to help you.
If you are having trouble while using canon printer on your device and you have tried every solution to fix the issue, then the last thing you are left with is to uninstall and re-install the Canon Printer driver. So, in this article, we have clearly discussed how to uninstall the printer on a Mac. This will be followed by a discussion on the re-installation process that can be easily done via canon.com/ijsetup canon,com/ijsetup
The streaming of video content online is trendy today as people move to modern entertainment. They subscribe to various streaming services like Netflix, Hulu, etc. Among other things, Amazon Prime is one such streaming service. This service not only allows you to stream videos but also allows you to utilise many other features. And this is all possible by getting amazon.com/code and redeeming it. how to use amazon discount code and redeeming it.
TD Bank Login is known to be a Canadian international subsidiary of the Toronto-Dominion Bank and its original town is Toronto, as suggested by the name. Their locations are worldwide and several thousand staff endeavour to fulfil customer requirements.
wells fargo login has become a renowned and trustworthy financial services firm, whose main focus is on aiding and benefiting society as a whole. They always highlight their assets, which are reported to be over a trillion dollars.
Yeah, at the moment, I don't remember my user ID and need to retrieve it, unfortunately. Whenever I hit Reset Password or Retrieve User ID and try to verify my information, the page just sits there. I've left it sitting for about 20 minutes before and it never did anything.Read More about: best buy login credit card

Anonymous said...

A set of software designed for a specific range of tasks and a specific user. In order to choose the best software or develop it, you need to use the following principles: performance, economy, control, and data security, compatibility, and flexibility, as well as hire excel expert. You will have fun, get positive feedback and achieve your goals.

Monnika Jacob said...

No matter how big and successful the brand is, consumers always have problems. Working as an expert author for Dissertation Proposal Writing Services, I consider only successful brands that assist their customers in a timely manner.

Unknown said...

Oh, I had such a problem when I tried to join Lync Online Meeting because it was necessary for my writing a case brief https://fabulouswritings.com/services/case-brief-writing-help Thanks for this explanation and now I know more about it.

Rian said...

event planner Viewers enjoy visual novelty. Visually changing things up can be as important as the content itself when it comes to keeping eyes on the stream happy birthday mom, happy birthday sister and happy birthday brother

Irony said...

There is no way to get this useful info from your way. Its very fabulous and easy for me to get it from FMWhatsApp. I am very thankful and I appreciate your intelligent work. Awesome!!

Bad Credit Finance Help said...

A six figure salary is a standard in the corporate world. This is a salary of at least $100,000. A five-figure salary is for those who earn less than $100,000 but more than $10,000. A million dollars is a good salary.

Kaylee Brown said...

Thanks for sharing such a fabulous article; you are helping both students and paper helpers with your insightful articles.

Top Dissertation Writing Services said...

I have read it completely and got really impressed. Love to read more about similar types of articles. Thanks a lot!!

Unknown said...

tv.youtube tv/start- YouTube is the best video-sharing platform. Where any users can upload and share videos with anyone able to access the site. Youtube is very different from other video-sharing platforms. It offers live shows, movies, and other video content from many channels. These videos can also be embedded and shared on other sites. YouTube was developed by former PayPal employees in 2005 and was acquired by Google in 2006. It has had a profound impact on media and advertising. It is a free video-hosting website that allows members to store and serve video content. You can easily activate YouTube TV on your device at tv.youtube.com/start.

omegle
hotmail sign in
www.amazon.com/mytv
amazon.com/code
aol mail login
ebay motors

GBwhatsApp APK said...

Thanks for the detailed article on this topic. I would like to see more such awesome articles from you.

COC MOD Apk said...

Excellent post, I am very impressed with this. Would love to see more stuff like this in future.

maria smiths said...

Use the card: By the use of a credit score or debit card no matter coins for maximum of the purchases, you could create a documented report of the spending.
AOL Mail Login |
AOL Mail Login |
AOL Mail Login |
AOL Mail Login |

Anonymous said...

Delicious post. In the very first session, I realized that I needed to seek help as soon as possible, which I do not regret. Helped me with
marketing plan writing and a couple of tests.

Mark Coli said...


A Canon across the board printer is great for both the home and office. Furthermore, all ij.start.cannon printers are viable with practically every major operating system, including Windows, Android, and Apple iOS. A Canon printer will likewise give you the best quality and speed when printing document. Printing task can be finished rapidly and effectively with Canon printers.

harlod said...

Canon printer setup, and installation, Activation of whole printing process that includes in setup. The canon printers produce a real feel and original-looking photos. Canon produces cameras, printers, lenses, scanners, and many more products. The printers are of laserjet, inkjet, etc. The printers wireless as well as wired plus they are refillable and all in one printer. It also provides smooth scanning and printing of material. There are even drivers for printing purposes which makes printing easy. The drivers can be downloaded and installed on the Android phone as well as in windows, PC, Mac.
Canon Printer Wireless Setup
canon ij setup

zarkazijar said...

Thanks for sharing such great information with us. Very nice and well-explained article. fed poly ekowe part-time programme requirement

Daniel Lisa said...

One such issue that torture QuickBooks is the QuickBooks Won't Open Error. It is a error that restricts the customer from opening the QB workspace programming.Luckily, you have shown up on the right page. In this post, we will urge you how to obliterate my quickbooks won't open error.

zarkazijar said...

I'm so much in love with this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thanks for sharing. approved school fees schedule for ibbu students

Patrika Jones said...

It's an amazing post. Thank you so much for sharing...

disneyplus.com login/begin
aka.ms/remoteconnect

Epicgamescomactivate said...

https://www.lotteryyogi.com/nebraska-lottery/
Nebraska Lottery has a long and storied history. It was created in 1993 to help fund the state’s education system, and it has since become one of the most popular lotteries in the country.nebraska-lottery/

fmwaapps said...

Today's media is very developed. especially fm whatsapp fmwaapps is more and more popular

TechUpNew said...

Today the media influences a lot of people. I also developed my own communication channel about
FFH4X Injector mod menu
. I am loved by many people

Anonymous said...

Good post
access diamond bank transfer code 2022/2023

sell s21 ultra said...

Your article is well written and simple to understand.You make excellent points.Thank you for sharing amazing blog.Nice.....

Fubotv Activate said...

Thanks for such a great article here. I was searching for something like this for quite a long time and at last, I found it on your blog.Its great to hear from you Im reaching out about your content you provide me with an updates of technology. fubo.tv/samsungtv-connect

mbuotidem said...

Thank you for the information it really help student to know their levels. check oaustech professional postgraduate admission form

fm whatsapp said...

Thank you for sharing this nice post, which includes plenty of valuable information. I thoroughly enjoyed reading it.FM Whatsapp

gbelegbo said...

No operating system beats Microsoft.
nexim bank recruitment 2023 2024

Desi Story said...

I was searching for something like this for quite a long time and at last, I found it on your blog.Its great to hear from you Im reaching out about your content you provide me with an updates of technology.

desi sex stories in hindi

dalton96 said...

Consider visiting this blog for insights into the origin and humor surrounding homework. It's an interesting read, and you might be pleasantly surprised by how things unfolded. Check it out! FM Whatsapp

Kairon said...

Gran artículo, espero que escribas más artículos. La página apktodo Español me parece muy entretenida, puedes consultarla.

Especial Rentals said...

You have some real writing talent. Enjoy Times Square while also enjoying an ideal peaceful stay in the city that never sleeps. Choose New York vacation rentals for a perfect blend of beauty, aesthetics, and modernity.

Anonymous said...

Great insights on the delay issue. I faced a similar problem when installing an apk android. Restarting my phone helped. Maybe worth trying!

Ricardo said...

The latest NBA 2k20 release brings exciting new features and updates to the game. With enhanced graphics and gameplay improvements, it offers a more immersive experience for fans and players alike. New player animations and updated team rosters make it even more realistic. Dive into the latest release and enjoy the thrill of NBA action like never before!

Anonymous said...

Mungkin juga faktor jaringan yang bisa mempengaruhi keterlambatan saat bergabung ke meeting. Selain itu, pastikan Mod apk game yang digunakan up-to-date untuk mengurangi masalah ini.