rrafluap Posted September 6, 2013 Posted September 6, 2013 Hi, Im using an ASP script to query WMI to monitor errors with printers and also services on 2 of the servers at our school, Its been working fine, but now im getting Code 500 errors. Once i look in the IIS logs i see that the reason for it failing is either "Out_of_memory_" when restarting IIS i got "No_more_threads_can_be_created_in_the_system._" and now am getting "The_paging_file_is_too_small_for_this_operation_to_complete._" errors. Obviously i now assume that the script is using too much memory (its reloaded every 10 seconds on a remote computer). Is there a way around this? Ive changed the WMI query from having SELECT * to specific field names so less memory is needed, but it must me holding the object in memory somewhere, is there a way to 'destroy' it? Im grateful for any suggestions, Thanks, Paul. strComputer = "." Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colListOfServices = objWMIService.ExecQuery("SELECT Caption, Started FROM Win32_Service WHERE StartMode = 'Auto'")
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now