Re: Segmentation fault in php5-imap

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

 



I just tried closing the message box and reopeining it, ie using imap_open & imap_close repeated, instead of imap_open, imap_reopen repeated, imap_close. Unfortunately, the server has a limit on the number of connections per minute, so I couldn't use that method...

I am implementing some conditions and exceptions, in order to avoid the segfault, and at least finish the execution of a script even if the connection is dropped.

I will let everyone know if I discover the source of the issue.

Nathan Nobbe wrote:
On Tue, Dec 23, 2008 at 5:30 PM, Dan Osipov <dosipov@xxxxxxxxxxxxxxx> wrote:

Script takes about 5 minutes to run (average). On other servers I've seen
it run over 2 hours without segfaults... All depends on how many messages
are in the NNTP mailboxes.


ok, so this is def a long running script then.

After applying the mentioned patch to libc-client2002edebian the issue
persisted. No change...


ok, lets check that one off the list then.


I'm not running xdebug. The PHP memory limit is 512 Mb and server has 16Gb
of RAM, so it doesn't look like its exhausting all the memory, although one
of the libraries potentially could?


ok, i didnt think so, but just wanted to make sure so as not to waste time,
when it could be an easy fix like that.


If this helps: It looks like the script is dropping connection to

the NNTP server. If it then tries to open another mailbox, it segfaults.
Otherwise it continues to run successfully.


hmm, well, i dont see any sort of functions in the imap api that check the
integriy of the imap stream.  its sounds lame, but have you considered
tearing down and rebuilding the connection after a fixed number of downloads
have completed.


But why does it drop the connection?


maybe php's client code just wasnt designed to hold imap connections open
for a long periods of time.  not sure though.

-nathan



--
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