Roundcube Community Forum

Release Support => Pending Issues => Topic started by: roundowl on February 26, 2016, 11:37:46 AM

Title: No IMAP connection once logged in
Post by: roundowl on February 26, 2016, 11:37:46 AM
Hello!

I've installed Roundcube on my mail server (server details below). It works, it allows me to log in, but as soon as I enter the box and IMAP connection drops - it never comes back. That means when I click on any button inside web-interface, server waits until time out and shows me a 502 error.

I tried googling, but to no avail. What can I do about it?

Server details:
Raspberry Pi with updated raspbian, nginx, php5-fpm, mysql, postfix, courier.

Syslog for one such connection: http://pastebin.com/0cs72AWN
nginx access and error logs: http://pastebin.com/x3AFNwCh
php5-fpm access and slow logs: http://pastebin.com/NycSTU1t
imap debug log (last part): http://pastebin.com/dbY44bmi

Additional info and config files on request. Sorry about x'es in logs, don't want to disclose my server.
Title: Re: No IMAP connection once logged in
Post by: SKaero on February 26, 2016, 03:36:13 PM
Is there anything in the Roundcube error log? In the IMAP log I see the following line which maybe some of your problem:

[26-Feb-2016 01:21:45 +0300]: <qqn1lqtt> [EF0A] S: * OK [ALERT] Filesystem notification initialization error -- contact your mail administrator (check for configuration errors with the FAM/Gamin library)
Title: Re: No IMAP connection once logged in
Post by: roundowl on February 26, 2016, 03:53:38 PM
Thanks for the reply.

There are no records in Roundcube error log. Last record is hours before that, mysql-related (I was pointing it at wrong address, fixed). Maybe there is a way to turn debug logging on.

As for that gamin problem - fixed that by installing 'gamin' package. Main problem is still there. I noticed that sometimes IMAP connection drops even before list of letters is fetched, and sometimes it holds enough time for the first refresh.
Title: Re: No IMAP connection once logged in
Post by: SKaero on February 26, 2016, 04:11:38 PM
Try enabling imap_debug in Roundcube and post the log.
Title: Re: No IMAP connection once logged in
Post by: roundowl on February 26, 2016, 04:26:30 PM
I've checked that "$config['imap_debug'] = true;", deleted previous debug log and retried connection. Here's full log, from pressing "Login" to 502 screen.

http://pastebin.com/8JZZ8kGp

Also there's one such log in original post for comparison.
Title: Re: No IMAP connection once logged in
Post by: SKaero on February 26, 2016, 04:39:56 PM
I don't see any problem with the mail server so my guess would be the problem is with the fpm nginx connection.
Title: Re: No IMAP connection once logged in
Post by: roundowl on February 26, 2016, 07:53:46 PM
I think I found the problem. In Roundcube config file I had $config['default_host'] = '%t';. I've set it to $config['default_host'] = 'localhost'; and it started working like it should. Kinda strange, because I have three different domains on this box.
Title: Re: No IMAP connection once logged in
Post by: roundowl on February 27, 2016, 10:19:29 AM
SKaero, actually you were right. Problem was not with Roundcube itself, problem was with everything else. Storage was slow and was blocking mysql queries. PHP-FPM had too many children and couldn't finish any job in time. General server optimization solved the problem completely.