SKaero, when I open a folder for a second time it's faster, Roundcube uses 'db cache' (MySQL in my case) but the searches always takes long time or it's ended with an IMAP error.
For example, this is a IMAP debug for a search on folder:
[16-Oct-2013 07:56:04 +0200]: [3556] S: * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2011 Double Precision, Inc. See COPYING for distribution information.
[16-Oct-2013 07:56:04 +0200]: [3556] C: A0001 LOGIN user@domain pass
[16-Oct-2013 07:56:04 +0200]: [3556] S: A0001 OK LOGIN Ok.
[16-Oct-2013 07:56:04 +0200]: [3556] C: A0002 SELECT INBOX
[16-Oct-2013 07:56:05 +0200]: [3556] S: * FLAGS ($MDNSent $Forwarded \Draft \Answered \Flagged \Deleted \Seen \Recent)
[16-Oct-2013 07:56:05 +0200]: [3556] S: * OK [PERMANENTFLAGS ($MDNSent $Forwarded \* \Draft \Answered \Flagged \Deleted \Seen)] Limited
[16-Oct-2013 07:56:05 +0200]: [3556] S: * 12313 EXISTS
[16-Oct-2013 07:56:05 +0200]: [3556] S: * 0 RECENT
[16-Oct-2013 07:56:05 +0200]: [3556] S: * OK [UIDVALIDITY 1299433429] Ok
[16-Oct-2013 07:56:05 +0200]: [3556] S: * OK [MYRIGHTS "acdilrsw"] ACL
[16-Oct-2013 07:56:05 +0200]: [3556] S: A0002 OK [READ-WRITE] Ok
[16-Oct-2013 07:56:05 +0200]: [3556] C: A0003 UID SORT (DATE) UTF-8 ALL OR HEADER FROM {4}
[16-Oct-2013 07:56:05 +0200]: [3556] S: + OK
[16-Oct-2013 07:56:05 +0200]: [3556] C: marc HEADER SUBJECT {4}
[16-Oct-2013 07:56:05 +0200]: [3556] S: + OK
[16-Oct-2013 07:56:05 +0200]: [3556] C: marc
[16-Oct-2013 07:57:03 +0200]: [22DD] S: * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2011 Double Precision, Inc. See COPYING for distribution information.
[16-Oct-2013 07:57:03 +0200]: [22DD] C: A0001 LOGIN user@domain pass
[16-Oct-2013 07:57:04 +0200]: [22DD] S: A0001 OK LOGIN Ok.
[16-Oct-2013 07:57:04 +0200]: [22DD] C: A0002 STATUS INBOX (MESSAGES UNSEEN)
[16-Oct-2013 07:57:04 +0200]: [22DD] S: * STATUS "INBOX" (MESSAGES 12313 UNSEEN 17)
[16-Oct-2013 07:57:04 +0200]: [22DD] S: A0002 OK STATUS Completed.
[16-Oct-2013 07:57:04 +0200]: [22DD] C: A0003 SELECT INBOX
[16-Oct-2013 07:57:04 +0200]: [22DD] S: * FLAGS ($MDNSent $Forwarded \Draft \Answered \Flagged \Deleted \Seen \Recent)
[16-Oct-2013 07:57:04 +0200]: [22DD] S: * OK [PERMANENTFLAGS ($MDNSent $Forwarded \* \Draft \Answered \Flagged \Deleted \Seen)] Limited
[16-Oct-2013 07:57:04 +0200]: [22DD] S: * 12313 EXISTS
[16-Oct-2013 07:57:04 +0200]: [22DD] S: * 0 RECENT
[16-Oct-2013 07:57:04 +0200]: [22DD] S: * OK [UIDVALIDITY 1299433429] Ok
[16-Oct-2013 07:57:04 +0200]: [22DD] S: * OK [MYRIGHTS "acdilrsw"] ACL
[16-Oct-2013 07:57:04 +0200]: [22DD] S: A0003 OK [READ-WRITE] Ok
[16-Oct-2013 07:57:04 +0200]: [22DD] C: A0004 UID SEARCH 12313
[16-Oct-2013 07:57:04 +0200]: [22DD] S: * SEARCH 58219
[16-Oct-2013 07:57:04 +0200]: [22DD] S: A0004 OK SEARCH done.
[16-Oct-2013 07:57:04 +0200]: [22DD] C: A0005 LOGOUT
[16-Oct-2013 07:57:04 +0200]: [22DD] S: * BYE Courier-IMAP server shutting down
[16-Oct-2013 07:57:04 +0200]: [22DD] S: A0005 OK LOGOUT completed
The browser shows the error "Error connecting to imap server failed" after 1 minute (from
07:56:05 to
07:57:03).
If I want that the search works fine and see results I need to change a parameter on my 'php.ini' (Apache): '
default_socket_timeout' from
60 to
240 (for example), restart 'Apache' and the searches now works fine after 1 minute. It normally takes 2 minutes max to return results.
With Ubuntu Server 11.04 performance was better, but not much better. Ubuntu Server 12.04 upgrades have new versions of Apache, MySQL, etc. Server hardware performance is pretty good and I don't know where's the problem.
Do you know exactly where I have the performance issue? Can it be that MySQL is taking to work or IMAP is a problem? Do you see anything unusual in the logs?
Thanks anyway!