Question
Ford
IN
Last activity: 5 May 2021 1:48 EDT
Out of Memory Exception from Outlook
Hi everyone, we have currently deployed a RPA use case in VDI. which continuously (start once and runs for ever) monitors the outlook application (looks for unread mails every 5 seconds after processing the existing unread email) using MicrosoftOutlook Connector and then proceeds as per the business logic. Everything is working fine but we keep on receiving the exception from Outlook after couple of days of running the automation.
Exception: System.OutOfMemoryException: Out of memory or system resources. Close some windows or programs and try again. at Microsoft.Office.Interop.Outlook.ItemsClass.Restrict(String Filter) at OpenSpan.Office.MicrosoftOutlook.InternalRetrieveEmail(String folder, ReadType readType, MAPIFolder& retrieveFolder) at OpenSpan.Office.MicrosoftOutlook.RetrieveEmail(String folder, ReadType readType) Message: Out of memory or system resources. Close some windows or programs and try again.
1) we thought its because of 100% cpu or 100% RAM usage. but its not.
2) if we stop the automation,runtime and restart everything its working fine. so whenever we are getting this exception we are restarting the automation.
Hi everyone, we have currently deployed a RPA use case in VDI. which continuously (start once and runs for ever) monitors the outlook application (looks for unread mails every 5 seconds after processing the existing unread email) using MicrosoftOutlook Connector and then proceeds as per the business logic. Everything is working fine but we keep on receiving the exception from Outlook after couple of days of running the automation.
Exception: System.OutOfMemoryException: Out of memory or system resources. Close some windows or programs and try again. at Microsoft.Office.Interop.Outlook.ItemsClass.Restrict(String Filter) at OpenSpan.Office.MicrosoftOutlook.InternalRetrieveEmail(String folder, ReadType readType, MAPIFolder& retrieveFolder) at OpenSpan.Office.MicrosoftOutlook.RetrieveEmail(String folder, ReadType readType) Message: Out of memory or system resources. Close some windows or programs and try again.
1) we thought its because of 100% cpu or 100% RAM usage. but its not.
2) if we stop the automation,runtime and restart everything its working fine. so whenever we are getting this exception we are restarting the automation.
3) we tried clearing developer cache(forms cache) and Roam cache of outlook everyday while the automation is running. but after 6 days of continuous run still we got the exception. we are looking to go for scheduling the automation for every 24 hours. so that in this way, at least it closes and opens the outlook once in 24 hours. (hoping that doing this way will not lead to the memory exception) before proceeding i just want to reach out to this forum if any one knows what exactly causes this exception and if there is any better way of handling it. Let me know if more details are required.