You were right,
I've raised the timeout to 600 and it's working, i also debuged dbmail and it was not a problem from imapd.
It's solved.


----- Original Message ----- From: "Jonathan Feally" <[EMAIL PROTECTED]>
To: "DBMail mailinglist" <[email protected]>
Sent: Thursday, July 05, 2007 3:19 AM
Subject: Re: [Dbmail] Bug #579


Your problem is not with DBMAIL, but rather either a slow database server or really big mailbox. I have hacked my dbmail-imap to sleep for 120 seconds when doing a search and it caused this same error on SM 1.4.9a. The default timeout on the socket is 60 seconds and of course a query on a sql server on a huge mailbox such as looking for aa in all of the message bodies is going to take a long time, once it exceeds 60 seconds, PHP fgets() will return because the socket says it timed out reading data. As suspected, it was a timeout issue, not a bug in DBMAIL.

This patch below shows you where to add a line to change this timeout to help with these types of operations in SM, but if the mailbox is too big, the user will just complain that the email server stops working - copy/paste patch to file:

--- functions/imap_general.php    Wed Oct  4 12:35:42 2006
+++ functions/imap_general.php       Wed Jul  4 19:01:36 2007
@@ -449,6 +449,9 @@

$imap_stream = @fsockopen($imap_server_address, $imap_port, $error_number, $error_string, 15);

+ // Extend normal timeout from 60 seconds to 150 seconds for slow servers doing complex operations such as body searching
+    @stream_set_timeout($imap_stream, 150);
+
    /* Do some error correction */
    if (!$imap_stream) {
        if (!$hide) {


-Jon


Jorge Bastos wrote:
PHP 5.2.1
SM 1.4.9
Apache 2.2.4

The error it's from dbmail, doesn't seams to be an error from a timeout.

ERROR:ERROR: Connection dropped by IMAP server.
     Query: SEARCH CHARSET ISO-8859-1 ALL BODY {2} aa



Paul,
Do you help me debuging this with gdb?




----- Original Message ----- From: "Jonathan Feally" <[EMAIL PROTECTED]>
To: "DBMail mailinglist" <[email protected]>
Sent: Wednesday, July 04, 2007 11:46 PM
Subject: Re: [Dbmail] Bug #579


Well - all page requests in SM do a login, the work, then log out. Thus each transaction is a separate login session. Looking at the SM code for this error - It is displayed when the fgets on the $imap_stream fails. So aside from the version numbers I've already asked for, what version apache, PHP, and SM are you running? This error doesn't actually mean that the TCP connection was closed to the server, but rather that reading from the connection failed, perhaps due to a time out on reading from the stream.

-Jon

Jorge Bastos wrote:
Hum,
But that i don't know, but like i said in the previous email, after i received the error, i pushed the logout button on squirrelmail.


----- Original Message ----- From: "Paul J Stevens" <[EMAIL PROTECTED]>
To: "DBMail mailinglist" <[email protected]>
Sent: Wednesday, July 04, 2007 8:14 AM
Subject: Re: [Dbmail] Bug #579


Jonathan Feally wrote:
What OS, kernel, glib, and db versions are you running? I tested the search command by hand using the literal method and did not have any problems at all. Also - your log file doesn't seem to indicate anything about the child process crashing out, but rather that the main parent process was told to shutdown down.

Damn, I didn't even see that! You're right; the process is shutdown clean.

Jul 2 23:23:15 lira dbmail/imap4d[6018]: Debug:[sql] dbmysql.c,db_query(+291): query [SELECT m.message_idnr,k.messageblk FROM dbmail_messageblks k JOIN dbmail_physmessage p ON k .physmessage_id = p.id JOIN dbmail_messages m ON p.id = m.physmessage_id WHERE mailbox_idnr = 507 AND status IN (0,1 ) AND k.is_header = '0' GROUP BY m.message_idnr,k.messageblk
HAVING k.messageblk LIKE '%aa%']

Jul 2 23:24:30 lira dbmail/imap4d[6000]: Debug:[server] server.c,server_run(+291): MainSigHandler(): got signal [15] Jul 2 23:24:30 lira dbmail/imap4d[6001]: Message:[server] pool.c,manage_stop_children(+470): General stop requested. Killing children...


So that query is taking rather long, after which something/someone requested a general shutdown of the dbmail-imapd processes.

There is no indication of a crash, but something is not right.

--
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail


_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail





_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail





_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail


_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to