RE: successive imap_open calls result in failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



felix@xxxxxxxxxxxxxxxxxxxx wrote:
> Quoting raditha dissanayake <jabber@xxxxxxxxxxx>:
>> 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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux