Re: [RCD] More info: httpd using 100% cpu...
Roy McMorran wrote: For now I'm looking at a workaround using stream_set_timeout on the imap socket. I'll let you know how that goes. I'm using the following as a workaround and it seems to help prevent the deadlock. This isn't tested thoroughly at all, and there are probably unintended consequences that I have not observed yet. Use at your own risk. --- imap.inc.dist 2008-04-03 17:59:33.10802 -0400 +++ imap.inc2008-04-03 18:42:08.009825000 -0400 @@ -467,6 +467,9 @@ $iil_errornum = -1; return false; } + //set socket timeout 10 secs + stream_set_blocking($conn-fp,FALSE); + stream_set_timeout($conn-fp,10); $iil_error .= Socket connection established\r\n; $line = iil_ReadLine($conn-fp, 300); Looking forward to that new imap lib ;-) Cheers, -r -- Roy McMorran Systems Administrator MDI Biological Laboratory [EMAIL PROTECTED] ___ List info: http://lists.roundcube.net/dev/
Re: [RCD] More info: httpd using 100% cpu...
On Thu, Apr 3, 2008 at 9:40 PM, Roy McMorran [EMAIL PROTECTED] wrote: Roy McMorran wrote: Often throughout the day I see instances where an httpd process will spike up to 100% cpu utilization and stay there for an extended period of time. After correlating information from a bunch of log files, I think I've found the circumstances that precipitate this problem. It seems to be a case of one or more users running Roundcube *and* another email program at the same time. UW-IMAP doesn't want to serve the same inbox to both imap clients. One of them gets cut off at the knees. Eg: Apr 3 14:51:10 mail imapd[12962]: [ID 289526 mail.info] Killed (lost mailbox lock) user=redacted host=mail.example.org [xxx.xxx.xxx.xxx] When the loser is Roundcube we get into the 100% CPU / CLOSE_WAIT scenario I described earlier. Is there any way we can make Roundcube more resilient in this situation? Or is there an IMAP server that isn't quite so brutal? Wow, thanks for tracking this down! I have never seen this with courier-imap. I often have it open on my Mac, the notebook and in RoundCube. But I could also be lucky. Till ___ List info: http://lists.roundcube.net/dev/
Re: [RCD] More info: httpd using 100% cpu...
till wrote: Wow, thanks for tracking this down! I have never seen this with courier-imap. I often have it open on my Mac, the notebook and in RoundCube. But I could also be lucky. Hi till, thanks for the reply. Does your courier-imap use mbox format, or something else? This: http://mailman1.u.washington.edu/pipermail/imap-uw/2007-December/001809.html suggests the behavior is more due to the limitations of mbox rather than a particular imap server. Nevertheless, mbox is still pretty popular and I don't think I can get away from it in my environment because I have many Unix command-line users (with pine, mutt, etc). Looking through my apache logs, all the hangs have occurred inside imap.inc, in various functions. Usually iil_Readline or iil_C_Select though. Best wishes, -r -- Roy McMorran Systems Administrator MDI Biological Laboratory [EMAIL PROTECTED] ___ List info: http://lists.roundcube.net/dev/
Re: [RCD] More info: httpd using 100% cpu...
using dovecot with Maildir here. never encountered any issues as described in this thread, although when using roundcube there is always another imap client (thunderbird) connected with the same user. chasd wrote: On Apr 3, 2008, at 2:40 PM, Roy McMorran wrote: I switched to dovecot after Fedora dropped uw-imap due to licensing issues. I found dovecot to be faster and to use less memory. YMMV. Policies here pretty much prevent two IMAP logins to the same account, so I can't say I've run across this problem, or how dovecot handles it. ___ List info: http://lists.roundcube.net/dev/
Re: [RCD] More info: httpd using 100% cpu...
On Thu, Apr 3, 2008 at 10:47 PM, Roy McMorran [EMAIL PROTECTED] wrote: till wrote: Wow, thanks for tracking this down! I have never seen this with courier-imap. I often have it open on my Mac, the notebook and in RoundCube. But I could also be lucky. Hi till, thanks for the reply. Does your courier-imap use mbox format, or something else? Maildir. (...) Nevertheless, mbox is still pretty popular and I don't think I can get away from it in my environment because I have many Unix command-line users (with pine, mutt, etc). I haven't seen pine and mutt in ages. I can't comment on this though I think an MUA uses IMAP as the interface and doesn't care about Mailbox or Mbox in the backend. Looking through my apache logs, all the hangs have occurred inside imap.inc, in various functions. Usually iil_Readline or iil_C_Select though. There are some loops in those functions which expect sequences/characters and if those don't come around we have potential leaks and breaks. I see what you mean, but don't hold your breath for a fix soon. We are looking for a replacement of our IMAP backend lib and will work on this as soon as we released the 0.1.1 (this weekend). Till ___ List info: http://lists.roundcube.net/dev/
Re: [RCD] More info: httpd using 100% cpu...
On Apr 3, 2008, at 4:01 PM, till wrote: I haven't seen pine and mutt in ages. We use a desktop graphical MUA ( Thunderbird, Evolution, or Apple's Mail.app ), RoundCube, and also alpine ( the successor to pine ) for text logins. Example of text login use : A video editor is working in Final Cut Pro on OS X and wants to maximize the computer resources for that, but still remain attentive to incoming e-mail. A telnet session to the internal mail host and running alpine does that without the overhead of a modern browser or graphical desktop MUA. Instead of 40 to 100 MB, a Terminal session is less than 10 MB of RAM, and much less CPU overhead. A terminal window takes up less screen real estate too. I can't comment on this though I think an MUA uses IMAP as the interface and doesn't care about Mailbox or Mbox in the backend. A remote MUA doesn't care about the type of mail storage, but something like alpine that accesses a local mail store does. Although alpine, pine or mutt can be configured to use either maildir or mbox. I believe you have to choose one, you can't mix. http://en.wikipedia.org/wiki/Comparison_of_e-mail_clients#Database. 2C_folders_and_customization The first column lists the storage formats supported. Actually one of the big additions to alpine over pine is support for remote connections, it doesn't have to access a local mail store. I'm off in the weeds here now, so I'll go away. Charles Dostale System Admin - Silver Oaks Communications http://www.silveroaks.com/ 824 17th Street, Moline IL 61265 ___ List info: http://lists.roundcube.net/dev/
Re: [RCD] More info: httpd using 100% cpu...
[EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] X-Sender: [EMAIL PROTECTED] Received: from cpe-72-224-141-4.maine.res.rr.com [72.224.141.4] with HTTP/1.1 (POST); Thu, 03 Apr 2008 19:19:11 -0400 User-Agent: RoundCube Webmail/0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Thu, 3 Apr 2008 23:01:25 +0200, till [EMAIL PROTECTED] wrote: There are some loops in those functions which expect sequences/characters and if those don't come around we have potential leaks and breaks. I see what you mean, but don't hold your breath for a fix soon. We are looking for a replacement of our IMAP backend lib For now I'm looking at a workaround using stream_set_timeout on the imap socket. I'll let you know how that goes. and will work on this as soon as we released the 0.1.1 (this weekend). Another new release? Awesome! -- Roy McMorran Systems Administrator MDI Biological Laboratory ___ List info: http://lists.roundcube.net/dev/
Re: [RCD] More info: httpd using 100% cpu...
[EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] X-Sender: [EMAIL PROTECTED] Received: from cpe-72-224-141-4.maine.res.rr.com [72.224.141.4] with HTTP/1.1 (POST); Thu, 03 Apr 2008 19:25:59 -0400 User-Agent: RoundCube Webmail/0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Charles Rainer, Thanks for the info about your configurations. Here, pine and mutt use mbox, but I will look into the possibilities you suggest. I think maildir would definitely clear up this issue. Cheers, -- Roy McMorran Systems Administrator MDI Biological Laboratory ___ List info: http://lists.roundcube.net/dev/