Using IMAP Chilkat 9.4.1 (either x86 or x64) on Production as part of a Windows Service - Few days after starting the service, the service seems to be stuck, consuming 100% CPU, all the time. Basically, the service connects to an Email Provider and parses emails.
For example, it uses this sample: http://www.example-code.com/csharp/imap_markAsRead.asp
I've tried calling Dispose() and assigning the Imap Connection object to null, as well as using GC.Collect(). Nothing seems to work.
The service itself can be multi-threaded - each thread has its own Imap Connection object.
Also, I've tried using only 1 thread - and it still hangs.
The service doesn't use much RAM - only CPU issue.
What could be the issue here?
Additional information: As suggested, I'm running debug logger with Chilkat.
In the meantime, at the service application logs every time it hangs - the log stops at a specific point: several milliseconds right after disconnecting from the Mail Server (Google is the mail service provider). Code Sample where it seems to hang according to the application service logs:
[IMAP CHILKAT DEBUG LOGS] Updating Logs - We use an Amazon VM and VPC and the network might fail, but the Chilkat code should not get stuck on 100% CPU - please review the following information from the Chilkat debug logs - the service reached 100% CPU and got stuck:
You'll need to do some basic debugging of your Windows Service to determine whether the 100% CPU utilization and hang occurs within a Chilkat method call or not. If NOT, then it's just your Windows Service this is spinning its wheels. If it is within Chilkat, (1) test with the latest version (v9.5.0) and (2) use the DebugLogFilePath property to find out what's going on within the particular call that spins/hangs.
answered Apr 17 '14 at 09:59