Re: [PHP] successive imap_open calls result in failure
[EMAIL PROTECTED] wrote: The problem is so far from php all I've been able to determine is that after so many folders being opened in quick succession, it gets blocked from being able to access any more for a period of about 5-10 minutes, which means that when your logged out due to the failed imap_open calls, you can't log back in for that period. This probably means that your imap server is running under xinetd (or something similar) that has a rate limit or a limit on the number of connections from one client. You can find out how many connections are open with netstat and i think you will find it's reached the allowed limit. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] successive imap_open calls result in failure
Quoting raditha dissanayake [EMAIL PROTECTED]: This probably means that your imap server is running under xinetd (or something similar) that has a rate limit or a limit on the number of connections from one client. You can find out how many connections are open with netstat and i think you will find it's reached the allowed limit. Cheers that does appear to be the problem, it runs under inetd and at the nowait argument it does not specify how many connections many be started within 60 seconds. Apparently its limited to 40 by default so this could explain why when searching 80 folders it craps out due to opening 80 connections without about 10 seconds. Guess I'll have to get the admins to increase the limit to something like 200-300 and look to see if there is any way for the php scripts to detect the problem and stop before hitting it. -- Darragh Bailey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] successive imap_open calls result in failure
[EMAIL PROTECTED] wrote: Quoting raditha dissanayake [EMAIL PROTECTED]: This probably means that your imap server is running under xinetd (or something similar) that has a rate limit or a limit on the number of connections from one client. You can find out how many connections are open with netstat and i think you will find it's reached the allowed limit. Cheers that does appear to be the problem, it runs under inetd and at the nowait argument it does not specify how many connections many be started within 60 seconds. Apparently its limited to 40 by default so this could explain why when searching 80 folders it craps out due to opening 80 connections without about 10 seconds. Guess I'll have to get the admins to increase the limit to something like 200-300 and look to see if there is any way for the php scripts to detect the problem and stop before hitting it. If possible, use an IMAP proxy. The proxy will keep a pool of connections open and when your IMP scripts request a new IMAP connection the proxy will return an already-open one if it exists (similar to persistant SQL connections). This may help reduce the frequency of the problem since fewer connections will open in a given time frame. Two imap proxies: http://www.horde.org/imapproxy/ http://www.imapproxy.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php