Author Topic: Roundcube become very very slow  (Read 264 times)

Offline rudi

  • Newbie
  • *
  • Posts: 2
Roundcube become very very slow
« on: December 07, 2017, 05:34:09 AM »
Hi everyone, I have roundcube with hmailserver and mysql under IIS (same machine win2012)
Only 4 accounts
Since 2 week it becomes extremely slow, so slow that is impossible to view messages in many folders (i.e. with 12000 messages inside)
when I click one of these folders (i.e. Ordini-Fatture Inviate) after some time appears "Server error: Failed to send FETCH command"

I cannot find where the problem is. 
Could someone help me?

If I manually query hmailserver tables in mysql, like "SELECT * FROM hm_messages WHERE messageaccountid=2 and messagefolderid=7 it takes 0.0005 sec....the problem is not mysql

I set debug level =4
and imap_debug =true

this is part of the log:
==============
[07-Dec-2017 10:19:38 +0100]: <p7l0rgu0> [48E1] S: )
[07-Dec-2017 10:19:38 +0100]: <p7l0rgu0> [48E1] S: A0007 OK UID completed
[07-Dec-2017 10:19:38 +0100]: <p7l0rgu0> [48E1] C: A0008 LIST "" Junk
[07-Dec-2017 10:19:38 +0100]: <p7l0rgu0> [48E1] S: * LIST (\HasNoChildren) "." "Junk"
[07-Dec-2017 10:19:38 +0100]: <p7l0rgu0> [48E1] S: A0008 OK LIST completed
[07-Dec-2017 10:19:38 +0100]: <p7l0rgu0> [48E1] C: A0009 GETQUOTAROOT INBOX
[07-Dec-2017 10:19:38 +0100]: <p7l0rgu0> [48E1] S: * QUOTAROOT INBOX ""
[07-Dec-2017 10:19:38 +0100]: <p7l0rgu0> [48E1] S: * QUOTA "" ()
[07-Dec-2017 10:19:38 +0100]: <p7l0rgu0> [48E1] S: A0009 OK GETQUOTAROOT completed
[07-Dec-2017 10:19:38 +0100]: <p7l0rgu0> [48E1] C: A0010 LOGOUT
[07-Dec-2017 10:19:38 +0100]: <p7l0rgu0> [48E1] S: * BYE Have a nice day
[07-Dec-2017 10:19:38 +0100]: <p7l0rgu0> [48E1] S: A0010 OK Logout completed
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: * OK IMAPrev1
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] C: A0001 CAPABILITY
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL NAMESPACE RIGHTS=texk
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: A0001 OK CAPABILITY completed
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] C: A0002 LOGIN ****** [32]
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: A0002 OK LOGIN completed
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] C: A0003 STATUS "INBOX.Ordini-Fatture Inviate" (MESSAGES UNSEEN)
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: * STATUS "INBOX.Ordini-Fatture Inviate" (MESSAGES 12712 UNSEEN 132)
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: A0003 OK Status completed
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] C: A0004 SELECT "INBOX.Ordini-Fatture Inviate"
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: * 12712 EXISTS
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: * 0 RECENT
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: * FLAGS (\Deleted \Seen \Draft \Answered \Flagged)
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: * OK [UIDVALIDITY 1418747970] current uidvalidity
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: * OK [UNSEEN 12969] unseen messages
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: * OK [UIDNEXT 13126] next uid
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: * OK [PERMANENTFLAGS (\Deleted \Seen \Draft \Answered \Flagged)] limited
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: A0004 OK [READ-WRITE] SELECT completed
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] C: A0005 UID SEARCH 12712
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: * SEARCH 13125
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] S: A0005 OK UID completed
[07-Dec-2017 10:19:55 +0100]: <p7l0rgu0> [35A3] C: A0006 UID SORT (DATE) US-ASCII ALL
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * OK IMAPrev1
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] C: A0001 CAPABILITY
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT ACL NAMESPACE RIGHTS=texk
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: A0001 OK CAPABILITY completed
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] C: A0002 LOGIN ****** [32]
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: A0002 OK LOGIN completed
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] C: A0003 STATUS "INBOX.Ordini-Fatture Inviate" (MESSAGES UNSEEN)
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * STATUS "INBOX.Ordini-Fatture Inviate" (MESSAGES 12712 UNSEEN 132)
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: A0003 OK Status completed
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] C: A0004 SELECT "INBOX.Ordini-Fatture Inviate"
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * 12712 EXISTS
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * 0 RECENT
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * FLAGS (\Deleted \Seen \Draft \Answered \Flagged)
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * OK [UIDVALIDITY 1418747970] current uidvalidity
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * OK [UNSEEN 12969] unseen messages
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * OK [UIDNEXT 13126] next uid
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * OK [PERMANENTFLAGS (\Deleted \Seen \Draft \Answered \Flagged)] limited
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: A0004 OK [READ-WRITE] SELECT completed
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] C: A0005 UID SEARCH 12712
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * SEARCH 13125
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: A0005 OK UID completed
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] C: A0006 STATUS INBOX (MESSAGES UNSEEN)
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * STATUS "INBOX" (MESSAGES 1421 UNSEEN 0)
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: A0006 OK Status completed
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] C: A0007 SELECT INBOX
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * 1421 EXISTS
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * 0 RECENT
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * FLAGS (\Deleted \Seen \Draft \Answered \Flagged)
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * OK [UIDVALIDITY 1418735005] current uidvalidity
[07-Dec-2017 10:20:58 +0100]: <p7l0rgu0> [4464] S: * OK [UIDNEXT 38377] next uid
[07-Dec-2017 10:20:59 +0100]: <p7l0rgu0> [4464] S: * OK [PERMANENTFLAGS (\Deleted \Seen \Draft \Answered \Flagged)] limited
[07-Dec-2017 10:20:59 +0100]: <p7l0rgu0> [4464] S: A0007 OK [READ-WRITE] SELECT completed
[07-Dec-2017 10:20:59 +0100]: <p7l0rgu0> [4464] C: A0008 UID SEARCH 1421
[07-Dec-2017 10:20:59 +0100]: <p7l0rgu0> [4464] S: * SEARCH 38375
[07-Dec-2017 10:20:59 +0100]: <p7l0rgu0> [4464] S: A0008 OK UID completed
[07-Dec-2017 10:20:59 +0100]: <p7l0rgu0> [4464] C: A0009 LOGOUT
[07-Dec-2017 10:20:59 +0100]: <p7l0rgu0> [4464] S: * BYE Have a nice day
[07-Dec-2017 10:20:59 +0100]: <p7l0rgu0> [4464] S: A0009 OK Logout completed





Offline alec

  • Hero Member
  • *****
  • Posts: 1,052
Re: Roundcube become very very slow
« Reply #1 on: December 07, 2017, 10:56:40 AM »
The connection is dropped after " A0006 UID SORT (DATE) US-ASCII ALL"  command. So, this is IMAP server issue. 12k messages is not a big number for other servers, but I don't know hmailserver. Maybe you should not sort by date, but instead set sorting column to "None" or try "Arrival date".

Offline rudi

  • Newbie
  • *
  • Posts: 2
Re: Roundcube become very very slow
« Reply #2 on: December 11, 2017, 10:20:03 AM »
Thank you.
I checked roundcube .ini settings, but sort is at default values. Your suggestion (thank you !!!) made me think and I checked the sort settings stored  inside the user web interface for those problematic folders.
The problem was just that! I set to 'None' + 'Descending' and messages in that folder appeared in les than 2 seconds.

I noticed that if you click on one column header (like date) this setting is set and stored, and the next time you display that folder, last stored setting are applied.

Is there any way not to automatically store that values and set to default for new sessions?

Roberto




// ----------------------------------
// USER INTERFACE
// ----------------------------------

// default messages sort column. Use empty value for default server's sorting,
// or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc'
$config['message_sort_col'] = '';

// default messages sort order
$config['message_sort_order'] = 'DESC';