fmbiete / Z-Push-contrib

Z-Push fork with changes that I will try to contrib
GNU Affero General Public License v3.0
135 stars 62 forks source link

number of IMAP logins #248

Open basbebe opened 8 years ago

basbebe commented 8 years ago

Is there a way to control the huge amount of IMAP logins Z-Push creates? When I resync, I get two IMAP logins per second. After that, I get one login per minute. Is this normal or a problem with my configuration?

fmbiete commented 8 years ago

It's normal if you see that the z-push execution ends correctly. You will have always a connection to the IMAP server for each z-push process. If the device is opening more than one at the same time you will see various sessions in your IMAP server. But it happens the same with other clients like Outlook, Thunderbird...

basbebe commented 8 years ago

So those logs are OK: BackendIMAP->close_connection(): disconnected from IMAP server?

fmbiete commented 8 years ago

If your see a close_connection for every open, yes, then they are OK. You should search for executions not completing correctly.

basbebe commented 8 years ago

Then I guess it's OK. I was just irritated that Apple mail seems to do faaaar less logins that iOS / Z-Push does.

basbebe commented 8 years ago

So this is OK?

Jan 26 07:38:12 mail dovecot: imap-login: Login: user=<xxxLzzz.yyy>, method=PLAIN, rip=10.0.0.12, lip=10.0.0.3, mpid=1425, TLS, TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)
Jan 26 07:38:14 mail dovecot: imap(xxxLzzz.yyy): Logged out in=1934 out=127523
Jan 26 07:38:17 mail dovecot: imap-login: Login: user=<xxxLzzz.yyy>, method=PLAIN, rip=10.0.0.12, lip=10.0.0.3, mpid=1427, TLS, TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)
Jan 26 07:38:19 mail dovecot: imap(xxxLzzz.yyy): Logged out in=3157 out=195535
Jan 26 07:38:48 mail dovecot: imap-login: Login: user=<xxxLzzz.yyy>, method=PLAIN, rip=10.0.0.12, lip=10.0.0.3, mpid=1429, TLS, TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)
Jan 26 07:38:49 mail dovecot: imap(xxxLzzz.yyy): Logged out in=305 out=2315
Jan 26 07:39:06 mail dovecot: imap-login: Login: user=<xxxLzzz.yyy>, method=PLAIN, rip=10.0.0.12, lip=10.0.0.3, mpid=1431, TLS, TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)
Jan 26 07:39:07 mail dovecot: imap(xxxLzzz.yyy): Logged out in=913 out=66076
Jan 26 07:39:09 mail dovecot: imap-login: Login: user=<xxxLzzz.yyy>, method=PLAIN, rip=10.0.0.12, lip=10.0.0.3, mpid=1433, TLS, TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)
Jan 26 07:39:10 mail dovecot: imap(xxxLzzz.yyy): Logged out in=1934 out=127523
Jan 26 07:39:15 mail dovecot: imap-login: Login: user=<xxxLzzz.yyy>, method=PLAIN, rip=10.0.0.12, lip=10.0.0.3, mpid=1435, TLS, TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)
Jan 26 07:39:17 mail dovecot: imap(xxxLzzz.yyy): Logged out in=3157 out=195535
Jan 26 07:39:47 mail dovecot: imap-login: Login: user=<xxxLzzz.yyy>, method=PLAIN, rip=10.0.0.12, lip=10.0.0.3, mpid=1437, TLS, TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)
Jan 26 07:39:47 mail dovecot: imap(xxxLzzz.yyy): Logged out in=305 out=2315
Jan 26 07:40:16 mail dovecot: imap-login: Login: user=<xxxLzzz.yyy>, method=PLAIN, rip=10.0.0.12, lip=10.0.0.3, mpid=1459, TLS, TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)
Jan 26 07:40:16 mail dovecot: imap(xxxLzzz.yyy): Logged out in=305 out=2315
Jan 26 07:40:44 mail dovecot: imap-login: Login: user=<xxxLzzz.yyy>, method=PLAIN, rip=10.0.0.12, lip=10.0.0.3, mpid=1461, TLS, TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)
Jan 26 07:40:44 mail dovecot: imap(xxxLzzz.yyy): Logged out in=305 out=2315
Jan 26 07:41:14 mail dovecot: imap-login: Login: user=<xxxLzzz.yyy>, method=PLAIN, rip=10.0.0.12, lip=10.0.0.3, mpid=1466, TLS, TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)
Jan 26 07:41:14 mail dovecot: imap(xxxLzzz.yyy): Logged out in=305 out=2315
Jan 26 07:41:43 mail dovecot: imap-login: Login: user=<xxxLzzz.yyy>, method=PLAIN, rip=10.0.0.12, lip=10.0.0.3, mpid=1468, TLS, TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)
Jan 26 07:41:43 mail dovecot: imap(xxxLzzz.yyy): Logged out in=305 out=2315
Jan 26 07:42:12 mail dovecot: imap-login: Login: user=<xxxLzzz.yyy>, method=PLAIN, rip=10.0.0.12, lip=10.0.0.3, mpid=1470, TLS, TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)
Jan 26 07:42:12 mail dovecot: imap(xxxLzzz.yyy): Logged out in=305 out=2315
Jan 26 07:42:40 mail dovecot: imap-login: Login: user=<xxxLzzz.yyy>, method=PLAIN, rip=10.0.0.12, lip=10.0.0.3, mpid=1472, TLS, TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)
Jan 26 07:42:40 mail dovecot: imap(xxxLzzz.yyy): Logged out in=305 out=2315
Jan 26 07:43:00 mail dovecot: imap(xxxLzzz.yyy): Connection closed (IDLE running for 0.001 + waiting input for 941.319 secs, 2 B in + 10+0 B out, state=wait-input) in=1171 out=3501
Jan 26 07:43:00 mail dovecot: imap(xxxLzzz.yyy): Connection closed (IDLE running for 0.001 + waiting input for 942.307 secs, 2 B in + 10+0 B out, state=wait-input) in=3267 out=8926
Jan 26 07:43:10 mail dovecot: imap-login: Login: user=<xxxLzzz.yyy>, method=PLAIN, rip=10.0.0.12, lip=10.0.0.3, mpid=1474, TLS, TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)
Jan 26 07:43:10 mail dovecot: imap(xxxLzzz.yyy): Logged out in=305 out=2315
Jan 26 07:43:38 mail dovecot: imap-login: Login: user=<xxxLzzz.yyy>, method=PLAIN, rip=10.0.0.12, lip=10.0.0.3, mpid=1476, TLS, TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)
Jan 26 07:43:39 mail dovecot: imap(xxxLzzz.yyy): Logged out in=305 out=2315
fmbiete commented 8 years ago

You have to compare that log with your z-push log and the access for your webserver (nginx/apache...). If you have an entry in every one of them, yes, it's ok.

BackendIMAP will connect/disconnect every few seconds when the devices are executing the Ping operation, that's also normal. I believe that opening/closing connections for a few seconds with IMAP server is better than maintaining a connection openned for more that 5 minutes.