Long delay for ManagedEventWatcher __InstanceCreationEvent query as number of user sessions increases

We have a Windows service that monitors for process start events and sends notifications to client applications.
We have discovered that the delay between when a process starts and when our EventArrivedEventHandler is called gets excessively long when the number of user sessions on the Windows server gets to about 80.
The delay gets worse as the number of user sessions gets higher.
The delays are not consistent. Even with 100 sessions some observed delays are short but most are too long and the maximum observed delay grows with the number of sessions.
Here is one example of the delay we are seeing.
A client application wrote its first log record to its log file at 11:05:34.076. Our EventArrivedEventHandler did not get notified of the process start event for the client application until 18 seconds later (at 11:05:52.188 ).
We need the delay to be less than 5 seconds to be tolerable and would like the delay to be less than 3 seconds if possible.
Is there something we can do to reduce the delay? Below are the details of our use of WMI.
We are using an instance of class WqlEventQuery to represent a WMI event query in WQL format.
We are constructing an instance of ManagementEventWatcher to consume events asynchronously.
Below is how we are instantiating and running the query. Variable m_PollingIntervalInMilliseconds is set to 1000 by default.
                WqlEventQuery query = new WqlEventQuery("__InstanceCreationEvent", new TimeSpan(0, 0, 0, 0, m_PollingIntervalInMilliseconds), "TargetInstance isa \"Win32_Process\"");
                m_ManagementEventWatcher = new ManagementEventWatcher(query);
                m_ManagementEventWatcher.EventArrived += new EventArrivedEventHandler(managementEventWatcher_EventArrived);
                m_ManagementEventWatcher.Start();
Our Windows service is not the only user of WMI services on the server. I do not know if there is contention with other users of WMI services or if there is something about the way we are consuming WMI services that is inefficient.

Hello RossAtWFMC,
It seems that the services are working with a complex environment, and currently, we do not have such an environment which could reproduce this issue you described. Anyway, I would like to share whatever I found and some suggestions about this issue:
>> called gets excessively long when the number of user sessions on the Windows server gets to about 80.
 The delay gets worse as the number of user sessions gets higher.
This seems to show that the issue is related with the number of user sessions, it may be that when with lots of user sessions, there are something additional delay the event to be fired. As you mentions, there are other services on that server machine, if
possible, you could make a test to run your WIM service only to see if it is still delayed.
>> Is there something we can do to reduce the delay?
I suggest that you could check this blog below which provide a way to debug with the .NET course code:
http://blogs.msdn.com/b/dotnet/archive/2014/02/24/a-new-look-for-net-reference-source.aspx
So that you could know which method inside costs most time.
From your provided code, it is not very clear if you use multi threads in your service, if not and your event handler is short, you could have a try with it, and there is a discussion about this topic:
https://social.msdn.microsoft.com/Forums/en-US/13f30e33-7f61-498e-a91a-ef982a63453c/event-handling-in-multithreaded-apps?forum=netfxbcl
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Number of user sessions / each session time

    Hi,
    I need to find out the following info
    1) Then number of user sessions and for each session duration for every user..
    is there a way to compute the same (if it's not directly available)..
    so basically at J2EE Session level how do i find out for each user what was the session time.
    Any pointers will be greatly appreciated.
    Regard,s
    Sam

    You can find some information within the NWA - Monitoring - Java Systems Report - report: User activities...
    Regards
    Timm

  • Long delay for authentication dialog 10.6.x to Windows 2008 SBS

    I am encountering a very long delay (30-45 seconds) for the authentication dialog when connecting from Mac OS X 10.6.2 clients to a Windows 2008 Small Business Server.
    We are connecting using the "Connect to Server" dialog, using smb://<server host name> and smb://<server IP address> as the URIs. Once the authentication dialog eventually comes up the users can log in successfully and access the shares on the server normally and at normal speed.
    I see this entry show up in the system.log when a smb connection is started:
    /System/Library/CoreServices/NetAuthAgent.app/Contents/MacOS/NetAuthAgent ### * process ### exceeded 500 log message per second limit - remaining messages this second discarded *
    I would like to see the NetAuthAgent log that is referred to in the error but I haven't been able to determine where this log resides or it I need to set NetAuthAgent or the smb client into a debug mode to capture logging.
    I have tried many of the usual fixes on the server side when it comes to Mac compatibility including:
    •Disabled SMB signing
    •Setting these registry values to 0:
    HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\Services\Lanmanserver\Parameters\Enablesecurity signature
    HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\Services\Lanmanserver\Parameters\Requiresecurit ysignature
    This was asked last October with no resolution:
    http://discussions.apple.com/thread.jspa?messageID=9804807
    If anyone has encountered this issue and discovered a solution please help. Thanks in advance!

    I'm having an issue with 10.6.x lately and Windows 2003.
    Random disconnects and the same log errors about the message limit.
    Feb 24 11:20:02 macpro-phil KernelEventAgent[73]: tid 00000000 received event(s) VQ_DEAD (32)
    Feb 24 11:20:02 macpro-phil KernelEventAgent[73]: tid 00000000 type 'smbfs', mounted on '/Volumes/VideoSAN', from '//ACC;Phillip.Roncoroni@acc-office/VideoSAN', dead
    Feb 24 11:20:02 macpro-phil KernelEventAgent[73]: tid 00000000 type 'smbfs', mounted on '/Volumes/ACC_docs', from '//ACC;Phillip.Roncoroni@acc-office/ACC_docs', dead
    Feb 24 11:20:02 macpro-phil KernelEventAgent[73]: tid 00000000 type 'smbfs', mounted on '/Volumes/Drop Box', from '//ACC;Phillip.Roncoroni@acc-office/Drop%20Box', dead
    Feb 24 11:20:02 macpro-phil KernelEventAgent[73]: tid 00000000 found 3 filesystem(s) with problem(s)
    Feb 24 11:20:02 macpro-phil KernelEventAgent[73]: tid 00000000 received event(s) VQ_DEAD (32)
    Feb 24 11:20:02 macpro-phil KernelEventAgent[73]: tid 00000000 type 'smbfs', mounted on '/Volumes/Photos', from '//ACC;Phillip.Roncoroni@acc-office/Photos', dead
    Feb 24 11:20:02 macpro-phil KernelEventAgent[73]: tid 00000000 found 1 filesystem(s) with problem(s)
    Also looking for a resolution.

  • Long delay for playback after moving a clip in timeline in Premiere CS6

    Whenever I move a clip in the timeline I have to wait a really long time for the image to show up in the preview monitor after pressing play. Audio starts ok but I see a black screen for a long time (varies from aprox. 2 to 30 seconds).
    This is a bit annoying as it disrupts the editing flow and really slows down the workflow.
    I'm cutting a Red Epic sequence on an 2011 iMac with 16 gb of ram. I never got this behaviour in CS5.
    Any suggestions?

    We need to know more to help you. Please provide answers to the questions listed here: "FAQ: What information should I provide when asking a question on this forum?"
    Also, to isolate the problem, try using some other media, not the Epic footage.

  • Long delay for login list to appear Mavericks Server

    I am currently looking at an issue where the login list of users takes up to 30 seconds to appear after a user has logged out of their account. This might not sound like much time, but is a long time for the user waiting to get the list. Any ideas on where to look for a remedy, or what tests might be applied would be appreciated.
    Clients are all 2012 - 2013 iMacs and Macbook Airs - About 140 nodes
    Server is a new Mid 2012 Mac Pro Server running Mavericks server with all updates. Open Directory network.
    Network is Gigabit with a 3com 4500 Layer 3 switch and Gig Lan switches.
    Message was edited by: Don Roedl - To edit out my personal machine, which is not relevant to the issue.

    Hello Don
    We have experienced the same issue.
    Are all clients 10.9 clients or 10.8 ?
    If 10.8 home directories should be served as AFP protocol. If 10.9 clients then it is SMB  ( SMB 2 )   OS X 10.10 Yosemite has moved from SMB2 to SMB3.
    Make sure in clients that you have "Show fast user switching" ticked off.
    Otherwise, the user logs out but the client machine will almost never unmount the previous user home directory shared point, the next user will not be able to log in.
    In Server.app under File Sharing you see idle users even after successful log out. It was our case.
    Some people on the internet went to the terminal to add precious terminal commands to force kill idle users after a "x" hours for instance.
    http://krypted.com/mac-security/missing-server-app-settings-for-afp/
    10.8 and 10.9 have differences.
    I suggest you read http://www.amazon.com/Apple-Pro-Training-Essentials-Supporting-ebook/dp/B00HJUBR Q0
    Even if you have lots of experience with OS X.

  • "  QUERY    REGARDING  NUMBER OF USER'S  "

    Hai,
      What is the Upper Limit for the Number of User's in  a SAP system???
    Ex : IF a User is created , how many (N number of user's can use the same SAP system???

    Hai
      Ashok,
           I don't know exact answer for ur question.
    By using rdisp/tm_max_no parameter , we can restrict the no of users per instance.
    The max. no of users allowed here is 10000.
    You can thus restrict how many users can log onto an instance simultaneously.
    You can see which users are logged on in the User Overview (transaction SM04).
    if it useful, reward points.
    Thank you,
    G.V.K.Prasad

  • What is parameter for total number of user sessions for entire SAP system

    Is there a profile parameter that limits total number of SAP user connections to that system. Im not talking about rdsip/max_alt_modes that limits number of sessions for particular user but a parameter that limits user connections to total number of users logging into particular system. I heard tht there is parameter that has default value 90, i want to change it but dont know whats the paramter name..plzz help me in this regard to proceed further.
    Thank you

    Hi,
    Use ST03/ST03N to check the number of users logged in.
    Use RZ10 to change the parameters
    Rakesh

  • Find query technical name for a deleted query/workbook in the User Menu

    Hi,
    When a BEx workbook or BEx query is published in a role, people with that role will see the query / workbook in their user menu.
    It is possible to change the caption/title of the 'node' in the user menu so it does not necessarily have the same name as the report.
    I am now in a situation where a user tries to run a query/workbook from the user menu, and runs in an error message 'query does not exist on server'.
    How can I found out to which query/workbook a node in the user menu refers?
    I have tried the Metadata repository but because of the many nodes in the user menu this is a laborious task.
    I was hoping to find a table where I could use the role name and node name to find the 'target' report but I haven't been able to find such a table.
    Any (other) suggestions?
    Many thanks,
    Jan.

    Hi,
    You can publish the workbook to the role and as user have access to the role he can access the workbook also.
    Regards,
    Kams

  • Number of user sessions in the Application Server for a config entry

    Hi All
    I am using 10g AS, with 9i DB.
    My requirement is that -
    i need to find the total number of users of the application in any moment, and to
    display that information to the users. say, config=abc, super users need to find all
    those who are using the link from the application itself.
    I can see that information from the 10 g Enterprise Manager -> Forms -> User Sessions.
    But is there any means of transfering that information to forms.
    Can this be done by using PJC's ?
    Please post your solutions/suggestions
    Thanks in Advance
    Deepa

    Any help/ideas Please
    Deepa

  • Query to get  Forms User Session

    Can any one suggest what is the SQL query to get the detail of the user session(Forms) in 10G Application Server Rel 2?

    How EM takes the IP address of user in the user_session of forms?
    Is there any table that it takes from?
    Thanx

  • Need long delay for buffered CO task

    I want to create a buffered CO task, when triggered, delay 5 min before output pulse.  Is this possible?
    PXIe-6341, Win7, LabVIEW 2013.
    The channel property: initial delay doesn't work for buffered CO task.
    The trigger property: start.delay not supported for the device.
    George Zou
    http://webspace.webring.com/people/og/gtoolbox

    Hey, George
    I do have a suggestion for you. Here's some code that will delay a set number of pulses of an input signal. If you input a 1kHz signal, then waiting 300,000 ticks would correspond to 5 minutes. You may have to use another counter to generate a pulse train signal that acts as the 1 kHz input, but this code is how you can do they delay. After the 300,000 ticks are counted, a pulse of a specified width is outputted by the counter which you could use as a start trigger for another task.

  • Long delay for add-in saving emails with Cached Exchange Mode off for one user's Exchange account

    Hello,
    Before I start, I have asked questions in the Outlook Developer forum and was referred here as it appears to be an Exchange Server problem that I am experiencing, not related to Outlook or the add-in that I am developing.
    I am an Outlook developer with an Outlook add-in that adds MAPI properties to emails and then calls MailItem.Save to save the changes.
    The add-in uses the Internet Message ID MAPI property for some functionality, so I have to turn turn Cached Exchange Mode off to ensure that my functionality works correctly for the Sent Items folder (otherwise no Message ID property exists).
    This process works fine for 99% of users.
    I have one particular user that has a huge delay (~1 minute) when MailItem.Save is called for items in his account. He is using an Exchange account. If I switch Cached Exchange Mode on there is no longer a delay (as no communication with Exchange Server). The
    user does not have an excessively large Mailbox.
    The problem is not caused by the network or communication path to the server as the problem exists on any computer where other users are ok.
    I'm sure the problem is not caused by my add-in, but likely a problem with the user's Exchange account. Does anyone have any suggestions on how I may be able to resolve the delay and what might be causing it?
    Thanks
    Glen Thomas

    Hello,
    Before I start, I have asked questions in the Outlook Developer forum and was referred here as it appears to be an Exchange Server problem that I am experiencing, not related to Outlook or the add-in that I am developing.
    I am an Outlook developer with an Outlook add-in that adds MAPI properties to emails and then calls MailItem.Save to save the changes.
    The add-in uses the Internet Message ID MAPI property for some functionality, so I have to turn turn Cached Exchange Mode off to ensure that my functionality works correctly for the Sent Items folder (otherwise no Message ID property exists).
    This process works fine for 99% of users.
    I have one particular user that has a huge delay (~1 minute) when MailItem.Save is called for items in his account. He is using an Exchange account. If I switch Cached Exchange Mode on there is no longer a delay (as no communication with Exchange Server). The
    user does not have an excessively large Mailbox.
    The problem is not caused by the network or communication path to the server as the problem exists on any computer where other users are ok.
    I'm sure the problem is not caused by my add-in, but likely a problem with the user's Exchange account. Does anyone have any suggestions on how I may be able to resolve the delay and what might be causing it?
    Thanks
    Glen Thomas

  • Long delay for Flash video to appear

    This is the second of a series of related questions about
    Flash video in DW.
    When I embed an flv into a DW page using "insert flash
    video", as you'd expect, it plays immediately when previewing it
    locally.
    When I view it live, i.e. online, however, it takes sometimes
    as long as 8 second before the player appears on the page.
    Once it appears, it plays fine. But the delay is
    unacceptable.
    Any ideas?
    Thanks.
    david

    Must be a fairly large file. Try sizing your video down to
    320 x 240 px or
    shortening the running time to reduce file size.
    --Nancy O.
    Alt-Web Design & Publishing
    www.alt-web.com
    "tenorocity" <[email protected]> wrote in
    message
    news:fge6fg$85c$[email protected]..
    > This is the second of a series of related questions
    about Flash video in
    DW.
    >
    > When I embed an flv into a DW page using "insert flash
    video", as you'd
    > expect, it plays immediately when previewing it locally.
    >
    > When I view it live, i.e. online, however, it takes
    sometimes as long as
    8
    > second before the player appears on the page.
    >
    > Once it appears, it plays fine. But the delay is
    unacceptable.
    >
    > Any ideas?
    >
    > Thanks.
    >
    > david
    >
    >
    >

  • After 7.0.2 long delay for menù showing up after restart

    Good morning , after upgrading to 7.0.2 my ATV 3 restart with only family sharing and configuration menù....i think it was a fault on the fw upgrade so i reset to default configuration.
    after restart everythings goes well and i restart configuring ATV but if i restart from the menù my ATV next boot again comes only family sharing and configuration...i think it was a fault in the 7.0.2 because if you also try to search for fw upgrade again i have error saying it was not possible to connect to the server...so i start thinking that after boot wireless interface is not ready...i left on ATV for about 5 minutes and magically all the menù appear...
    before 7.0.2 there is no such problem...anyone experience the same  ?
    please let me know because i don't want to reconfigure the whole ATV to discover i need to hardware initialize again to try to solve the problem...

    Assuming this is not the first time you have used your Apple TV
    You might try restarting the Apple TV by removing ALL the cables for 30 seconds.
    Also try restarting the router. (Also try removing it’s power cord for at least 30 seconds)
    If the problem persists, try a restore, you may want to try the previous procedures several times before doing this.
    If restoring from the Apple TV doesn't help, try restoring from iTunes using a USB cable.
    If this is a new Apple TV, in addition to trying the above, it may also be that your network router is not allowing access to the timeserver, check that your router allows access over port 123.

  • Long delays for all functions

    As of recently my computer has been functioning extremely slowly. It started off with the internet pages loading slowly then it was moving on to every other task that was delayed, was slow to process, or the spinning wheel constantly shows up. Everything that is delayed is from wither opening or closing internet programs, other non internet windows, down to typing into fields. Even as I type this its painful watching the letters type 1 at a time or stops all togehter.  I have tried many things, we backed up the computer, we did all the cleaning techniques, downloaded programs to help figure out problems, verified and confirmed we have plenty of memory & storage, deleted unused files, we did diagnostic tests which came back with no issues, we tried re-configuring our WiFi connection. I have a MacBook Pro - Processor: 2.5 GHz Intel Core i5 2012 software is OS X 10.8.5. I don't know what else to do or what the issue is. Please help

    Run this and post the results here so you know more about your computer
    EtreCheck
    Also, this is the Mac Pro desktop forum

Maybe you are looking for

  • Macbook Air wont's open PDF in Safari browser Version 7.1 (9537.85.10.17.1)

    Hi Guys, can anyone help me out here i bought a new 2014 Macbook Air with a maverick's OS X Version 10.9.5 and it wont's open PDF in Safari browser Version 7.1 (9537.85.10.17.1). I have a adobe reader Version IX 11.0.09 this is the message i get when

  • AMF connection working on browser, not in stand alone player

    Greetings, I'm trying to communicate my SWF file with PHP using Zend_Amf. I compile the flash side using Flex SDK 4. Whenever I try to run the swf using the stand alone player (the projector), I always get a NetConnection.Call.BadVersion event. Howev

  • Public class and the source filename

    May be I'm asking a silly question, but why the name of the source file needs to match with the public class's name? If the rule is that only one public class is allowed per source file, then the compiler can simply flag the error and quit. Any reaso

  • Cannot install 10.6.3 on macbook pro13

    Cannot install 10.6.3 on MacBook Pro it shuts down when you start to install

  • Mounting network drive failing when launched with "crontab"...

    Greetings! Here's my problem: I have a cron job (domain user) that launch a perl script. Somewhere in the script, I mount a network drive like this: "/sbin/mount_smbfs //user:pw@machine/path" I get the following error: mount_smbfs: server connection