J
James - SD, CA
Hi Everybody,
When running a .NET app that uses Outlook Interop, we're getting this
message as an exception: "Out of memory or system resources. Close some
windows or programs and try again."
Basically, we're not sure if this is an Interop issue, an Outlook issue or
an Environment issue. Any insight anybody might have as to what could be
causing this, or even a way to attack this issue, would be greatly
appreciated.
Here's a full rundown of the situation:
We have a Windows application written in .NET that uses Outlook Interop
(we're using Outlook 2007) to process incoming emails, 24/7. The typical use
case of the system is:
1) Email is received
2) Our application polls Outlook and sees the email
3) Application saves email to file system, write some rows to a database
4) Move email (in Outlook) to a "Processed" folder
In the case of an error, email is moved to a folder in Outlook for manual
processing. The "Processed" folder described above is set to AutoArchive,
daily, moving messages older than 1 day to an archive file.
We deployed this application about 4 weeks ago, and twice, about a week and
a half apart, we got the following exception:
Message: Out of memory or system resources. Close some windows or programs
and try again.
Stack Trace: at
Microsoft.Office.Interop.Outlook.ApplicationClass.AdvancedSearch(String
Scope, Object Filter, Object SearchSubFolders, Object Tag)
at [our code that makes a call to Outlook for new messages to process]
To recover from this error, we have to stop both our application and Outlook
(including killing the OUTLOOK.exe process), and restarting both. Trying to
navigate around Outlook before restarting it results in pop up windows with
the same "Out of memory" message.
We were unable to determine the cause of this exception; the computer event
logs were of no use, as were our application's log. We have a number of
other custom applications running on the server, but none of which are
particularly memory intensive. Server is a VMware virtual machine, with a
2.66GHz processor and 2GB of RAM, running Server 2003 R2 Standard SP2. We
don't see how the memory could be spiking, on a few spot checks, the combined
memory usage for our application and Outlook never got over 120 megs. No
other app on the machine is having memory issues.
The only working theory right now is that it might be related to
AutoArchive, which archives about 500 megs of emails when it goes off.
AutoArchive needs to be done, however, as 500 megs is also the size of the
mailbox quota. We have enabled logging in Outlook, which we hope should shed
some light on this should the problem reoccur.
Again, any ideas or thoughts on attacking this issue would be greatly
appreciated!
Thanks!
James
When running a .NET app that uses Outlook Interop, we're getting this
message as an exception: "Out of memory or system resources. Close some
windows or programs and try again."
Basically, we're not sure if this is an Interop issue, an Outlook issue or
an Environment issue. Any insight anybody might have as to what could be
causing this, or even a way to attack this issue, would be greatly
appreciated.
Here's a full rundown of the situation:
We have a Windows application written in .NET that uses Outlook Interop
(we're using Outlook 2007) to process incoming emails, 24/7. The typical use
case of the system is:
1) Email is received
2) Our application polls Outlook and sees the email
3) Application saves email to file system, write some rows to a database
4) Move email (in Outlook) to a "Processed" folder
In the case of an error, email is moved to a folder in Outlook for manual
processing. The "Processed" folder described above is set to AutoArchive,
daily, moving messages older than 1 day to an archive file.
We deployed this application about 4 weeks ago, and twice, about a week and
a half apart, we got the following exception:
Message: Out of memory or system resources. Close some windows or programs
and try again.
Stack Trace: at
Microsoft.Office.Interop.Outlook.ApplicationClass.AdvancedSearch(String
Scope, Object Filter, Object SearchSubFolders, Object Tag)
at [our code that makes a call to Outlook for new messages to process]
To recover from this error, we have to stop both our application and Outlook
(including killing the OUTLOOK.exe process), and restarting both. Trying to
navigate around Outlook before restarting it results in pop up windows with
the same "Out of memory" message.
We were unable to determine the cause of this exception; the computer event
logs were of no use, as were our application's log. We have a number of
other custom applications running on the server, but none of which are
particularly memory intensive. Server is a VMware virtual machine, with a
2.66GHz processor and 2GB of RAM, running Server 2003 R2 Standard SP2. We
don't see how the memory could be spiking, on a few spot checks, the combined
memory usage for our application and Outlook never got over 120 megs. No
other app on the machine is having memory issues.
The only working theory right now is that it might be related to
AutoArchive, which archives about 500 megs of emails when it goes off.
AutoArchive needs to be done, however, as 500 megs is also the size of the
mailbox quota. We have enabled logging in Outlook, which we hope should shed
some light on this should the problem reoccur.
Again, any ideas or thoughts on attacking this issue would be greatly
appreciated!
Thanks!
James