<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>I examined my mysql problem&nbsp;a little more&nbsp;and got the following:</div><div><br></div><div>the following log (2) shows, I preforked 7 imapd -s childs (by /etc/cyrus.conf) and while one of the processes still reads from the local mysql server (see process 32711), newly forked imapd childs are loosing this ability (see process 9881). From this time on nearly all newly created childs can't connect to the mysql server (even then when the "good ones" = 32711 are terminated).&nbsp;</div><div><br></div><div>In a very rapid process ( because childs with connection errors are terminated see log 1) new childs are forked and forked (in my case 1 fork/second the next 2 minutes - as well imaps as https processes) until without restarting the master process some childs are forked, which are again able to connect to the mysql server. But the forking process goes on and tries to reach the number of preforked childs. This fills the logs because only any then and now a "good" process is created.</div><div><br></div><div>But only if I restart the master any child is working. The default max connection limit is set to the default (150) for the mysql server. This is still a testing environment with only one user connected by one open mailer.</div><div><br></div><div><br></div><div>Many regards,</div><div><br></div><div>Rudi Gabler</div><div><br></div><div><br></div><div>---</div><div>log 1 shows the typically error when a child is unsuccessfully forked. Interestingly it tries to connect to the mysql server for the information of quotas and then to the file /var/lib/imap/quotas.db. But there is no specification in which format this file should be (because it should be in a sql database).</div><div><br></div><div>log 1:</div><div><br></div><div><div>Sep 12 12:45:16 xmailer imaps[31321]: SQL backend trying to connect to a host</div><div>Sep 12 12:45:16 xmailer imaps[31321]: SQL backend trying to open db 'cyrusdb' on host 'localhost'</div><div>Sep 12 12:45:16 xmailer imaps[31321]: executing SQL cmd: SELECT * FROM mailboxes_db LIMIT 0;</div><div>Sep 12 12:45:16 xmailer imaps[31321]: SQL backend trying to connect to a host</div><div>Sep 12 12:45:16 xmailer imaps[31321]: SQL backend trying to open db 'cyrusdb' on host 'localhost'</div><div>Sep 12 12:45:16 xmailer imaps[31321]: DBERROR: SQL backend could not connect to host localhost</div><div>Sep 12 12:45:16 xmailer imaps[31321]: DBERROR: could not open SQL database 'cyrusdb'</div><div>Sep 12 12:45:16 xmailer imaps[31321]: DBERROR: opening /var/lib/imap/quotas.db: cyrusdb error</div><div>Sep 12 12:45:16 xmailer imaps[31321]: Fatal error: can't read quotas file</div><div>Sep 12 12:45:16 xmailer master[32309]: process 31321 exited, status 75</div><div>Sep 12 12:45:16 xmailer master[32309]: service imaps pid 31321 in READY state: terminated abnormally</div></div><div><br></div><div><br></div><div>log 2:</div><div><br></div><div><div>Sep 12 12:23:56 xmailer imaps[32711]: executing SQL cmd: SELECT * FROM mailboxes_db WHERE dbkey = 'user.rug.Solved.emulex';</div><div>Sep 12 12:23:56 xmailer imaps[32711]: fetching user_deny.db entry for 'rug'</div><div>Sep 12 12:23:56 xmailer imaps[32711]: executing SQL cmd: SELECT * FROM mailboxes_db WHERE dbkey = 'user.rug.Solved.FFM';</div><div>Sep 12 12:23:56 xmailer imaps[32711]: executing SQL cmd: SELECT * FROM mailboxes_db WHERE dbkey = 'user.rug.Solved.FFM';</div><div>Sep 12 12:23:56 xmailer imaps[32711]: fetching user_deny.db entry for 'rug'</div><div>Sep 12 12:23:56 xmailer imaps[4803]: fetching user_deny.db entry for 'rug'</div><div>Sep 12 12:23:56 xmailer imaps[9881]: executed</div><div>Sep 12 12:23:56 xmailer imaps[32711]: executing SQL cmd: SELECT * FROM mailboxes_db WHERE dbkey = 'user.rug.Solved.Fireball';</div><div>Sep 12 12:23:56 xmailer imaps[32711]: executing SQL cmd: SELECT * FROM mailboxes_db WHERE dbkey = 'user.rug.Solved.Fireball';</div><div>Sep 12 12:23:56 xmailer imaps[9881]: SQL backend trying to connect to a host</div><div>Sep 12 12:23:56 xmailer imaps[9881]: SQL backend trying to open db 'cyrusdb' on host 'localhost'</div><div>Sep 12 12:23:56 xmailer imaps[4803]: fetching user_deny.db entry for 'rug'</div><div>Sep 12 12:23:56 xmailer imaps[32711]: fetching user_deny.db entry for 'rug'</div><div>Sep 12 12:23:56 xmailer imaps[32711]: executing SQL cmd: SELECT * FROM mailboxes_db WHERE dbkey = 'user.rug.Solved.Fu&amp;AN8-ball';</div><div>Sep 12 12:23:56 xmailer imaps[32711]: executing SQL cmd: SELECT * FROM mailboxes_db WHERE dbkey = 'user.rug.Solved.Fu&amp;AN8-ball';</div><div>Sep 12 12:23:56 xmailer imaps[9881]: executing SQL cmd: SELECT * FROM mailboxes_db LIMIT 0;</div><div>Sep 12 12:23:56 xmailer imaps[32711]: fetching user_deny.db entry for 'rug'</div><div>Sep 12 12:23:56 xmailer imaps[32711]: executing SQL cmd: SELECT * FROM mailboxes_db WHERE dbkey = 'user.rug.Solved.Hawaii';</div><div>Sep 12 12:23:56 xmailer imaps[32711]: executing SQL cmd: SELECT * FROM mailboxes_db WHERE dbkey = 'user.rug.Solved.Hawaii';</div><div>Sep 12 12:23:56 xmailer imaps[32711]: fetching user_deny.db entry for 'rug'</div><div>Sep 12 12:23:56 xmailer imaps[32711]: executing SQL cmd: SELECT * FROM mailboxes_db WHERE dbkey = 'user.rug.Solved.iostat';</div><div>Sep 12 12:23:56 xmailer imaps[32711]: executing SQL cmd: SELECT * FROM mailboxes_db WHERE dbkey = 'user.rug.Solved.iostat';</div><div>Sep 12 12:23:56 xmailer imaps[9881]: SQL backend trying to connect to a host</div><div>Sep 12 12:23:56 xmailer imaps[9881]: SQL backend trying to open db 'cyrusdb' on host 'localhost'</div><div>Sep 12 12:23:56 xmailer imaps[32711]: fetching user_deny.db entry for 'rug'</div><div>Sep 12 12:23:56 xmailer imaps[32711]: executing SQL cmd: SELECT * FROM mailboxes_db WHERE dbkey = 'user.rug.Solved.isdndec';</div><div>Sep 12 12:23:56 xmailer imaps[32711]: executing SQL cmd: SELECT * FROM mailboxes_db WHERE dbkey = 'user.rug.Solved.isdndec';</div><div>Sep 12 12:23:56 xmailer imaps[9881]: DBERROR: SQL backend could not connect to host localhost</div><div>Sep 12 12:23:56 xmailer imaps[9881]: DBERROR: could not open SQL database 'cyrusdb'</div><div>Sep 12 12:23:56 xmailer imaps[9881]: DBERROR: opening /var/lib/imap/quotas.db: cyrusdb error</div><div>Sep 12 12:23:56 xmailer imaps[9881]: Fatal error: can't read quotas file</div><div>Sep 12 12:23:56 xmailer imaps[32711]: fetching user_deny.db entry for 'rug'</div><div>Sep 12 12:23:56 xmailer imaps[32711]: executing SQL cmd: SELECT * FROM mailboxes_db WHERE dbkey = 'user.rug.Solved.JENAM';</div><div>Sep 12 12:23:56 xmailer imaps[32711]: executing SQL cmd: SELECT * FROM mailboxes_db WHERE dbkey = 'user.rug.Solved.JENAM';</div><div>Sep 12 12:23:56 xmailer imaps[32711]: fetching user_deny.db entry for 'rug'</div></div><div>..</div><div><div>Sep 12 12:23:56 xmailer master[32309]: process 9881 exited, status 75</div><div>Sep 12 12:23:56 xmailer master[32309]: service imaps pid 9881 in READY state: terminated abnormally</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Wed, 11 Sep 2013 09:46:17 +0200<br>From: Rudolf Gabler &lt;<a href="mailto:rug@usm.lmu.de">rug@usm.lmu.de</a>&gt;<br>Subject: mysql problem<br>To:&nbsp;<a href="mailto:info-cyrus@lists.andrew.cmu.edu">info-cyrus@lists.andrew.cmu.edu</a><br>Message-ID: &lt;<a href="mailto:ADBE1AB6-540B-4FA2-ADBE-98FDA0973586@usm.lmu.de">ADBE1AB6-540B-4FA2-ADBE-98FDA0973586@usm.lmu.de</a>&gt;<br>Content-Type: text/plain; charset="windows-1252"<br><br>Hi,<br><br>the cyrus-imapd-2.4.17-caldav-beta6 release shows the following:<br><br>After a fresh start with a mysql database for several purposes&nbsp;<br><br>duplicate_db: sql<br>mboxlist_db: sql<br>quota_db: sql<br>tlscache_db: sql<br><br>the system is running as expected. After approximately the 10 imaps contact suddenly the following occurs:<br><br>Sep 11 09:43:29 xmailer imaps[8168]: DBERROR: SQL query failed: MySQL server has gone away<br>Sep 11 09:43:29 xmailer imaps[8168]: DBERROR: SQL failed SELECT * FROM mailboxes_db WHERE dbkey = 'user?..<br><br>But the local mysql server is o.k. and running. After a restart of cyrus (/etc/init.d/cyrus-imapd restart) everything is working until the next appr. 10 connection times by the user.<br><br>If I use sqlite instead everything is stable for at least a month.&nbsp;<br><br>Any hint what may occur?<br><br>Regards,<br><br>Rudi Gabler<br>-------------- next part --------------<br>A non-text attachment was scrubbed...<br>Name: signature.asc<br>Type: application/pgp-signature<br>Size: 495 bytes<br>Desc: Message signed with OpenPGP using GPGMail<br>Url :&nbsp;<a href="http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20130911/7b0ff055/attachment-0001.bin">http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20130911/7b0ff055/attachment-0001.bin</a>&nbsp;<br><br>------------------------------<br><br>Message: 2<br>Date: Wed, 11 Sep 2013 19:43:33 +1000<br>From: Bron Gondwana &lt;<a href="mailto:brong@fastmail.fm">brong@fastmail.fm</a>&gt;<br>Subject: Re: mysql problem<br>To:&nbsp;<a href="mailto:info-cyrus@lists.andrew.cmu.edu">info-cyrus@lists.andrew.cmu.edu</a><br>Cc: Ken Murchison &lt;<a href="mailto:murch@andrew.cmu.edu">murch@andrew.cmu.edu</a>&gt;<br>Message-ID:<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;1378892613.11046.20578185.3FFF81BF@<a href="http://webmail.messagingengine.com/">webmail.messagingengine.com</a>&gt;<br>Content-Type: text/plain; charset="utf-8"<br><br>On Wed, Sep 11, 2013, at 05:46 PM, Rudolf Gabler wrote:<br><blockquote type="cite">Hi,<br><br>the cyrus-imapd-2.4.17-caldav-beta6 release shows the following:<br><br>After a fresh start with a mysql database for several purposes&nbsp;<br><br>duplicate_db: sql<br>mboxlist_db: sql<br>quota_db: sql<br>tlscache_db: sql<br><br>the system is running as expected. After approximately the 10 imaps contact suddenly the following occurs:<br><br>Sep 11 09:43:29 xmailer imaps[8168]: DBERROR: SQL query failed: MySQL server has gone away<br>Sep 11 09:43:29 xmailer imaps[8168]: DBERROR: SQL failed SELECT * FROM mailboxes_db WHERE dbkey = 'user?..<br><br>But the local mysql server is o.k. and running. After a restart of cyrus (/etc/init.d/cyrus-imapd restart) everything is working until the next appr. 10 connection times by the user.<br></blockquote><br>Smells like connection handle leakage, or leakage of some other finite resource in the mysql library.<br><br><blockquote type="cite">Any hint what may occur?<br></blockquote><br>Ken - any ideas? &nbsp;You know this code better than I do.<br><br>Bron.<br><br>--&nbsp;<br>&nbsp;Bron Gondwana<br>&nbsp;<a href="mailto:brong@fastmail.fm">brong@fastmail.fm</a><br><br><br>------------------------------<br><br>Message: 3<br>Date: Wed, 11 Sep 2013 07:00:09 -0400<br>From: Ken Murchison &lt;<a href="mailto:murch@andrew.cmu.edu">murch@andrew.cmu.edu</a>&gt;<br>Subject: Re: mysql problem<br>To: Bron Gondwana &lt;<a href="mailto:brong@fastmail.fm">brong@fastmail.fm</a>&gt;<br>Cc:&nbsp;<a href="mailto:info-cyrus@lists.andrew.cmu.edu">info-cyrus@lists.andrew.cmu.edu</a><br>Message-ID: &lt;52304D39.2030804@<a href="http://andrew.cmu.edu/">andrew.cmu.edu</a>&gt;<br>Content-Type: text/plain; charset=UTF-8; format=flowed<br><br>On 9/11/13 5:43 AM, Bron Gondwana wrote:<br><blockquote type="cite">On Wed, Sep 11, 2013, at 05:46 PM, Rudolf Gabler wrote:<br><blockquote type="cite">Hi,<br><br>the cyrus-imapd-2.4.17-caldav-beta6 release shows the following:<br><br>After a fresh start with a mysql database for several purposes<br><br>duplicate_db: sql<br>mboxlist_db: sql<br>quota_db: sql<br>tlscache_db: sql<br><br>the system is running as expected. After approximately the 10 imaps contact suddenly the following occurs:<br><br>Sep 11 09:43:29 xmailer imaps[8168]: DBERROR: SQL query failed: MySQL server has gone away<br>Sep 11 09:43:29 xmailer imaps[8168]: DBERROR: SQL failed SELECT * FROM mailboxes_db WHERE dbkey = 'user?..<br><br>But the local mysql server is o.k. and running. After a restart of cyrus (/etc/init.d/cyrus-imapd restart) everything is working until the next appr. 10 connection times by the user.<br></blockquote>Smells like connection handle leakage, or leakage of some other finite resource in the mysql library.<br><br><blockquote type="cite">Any hint what may occur?<br></blockquote>Ken - any ideas? &nbsp;You know this code better than I do.<br><br>Bron.<br><br></blockquote><br>No, I don't have any ideas. &nbsp;I don't have any experience using MySQL for&nbsp;<br>all Cyrus databases (or any Cyrus db for that matter), and the *DAV code&nbsp;<br>uses SQLite, not mySQL, and does so directly without going through the&nbsp;<br>cyrusdb API.<br><br>--&nbsp;<br>Kenneth Murchison<br>Principal Systems Software Engineer<br>Carnegie Mellon University<br><br><br><br>------------------------------<br><br>Message: 4<br>Date: Wed, 11 Sep 2013 08:53:09 -0500<br>From: Blake Hudson &lt;<a href="mailto:blake@ispn.net">blake@ispn.net</a>&gt;<br>Subject: Re: mysql problem<br>To:&nbsp;<a href="mailto:info-cyrus@lists.andrew.cmu.edu">info-cyrus@lists.andrew.cmu.edu</a><br>Message-ID: &lt;523075C5.80705@<a href="http://ispn.net/">ispn.net</a>&gt;<br>Content-Type: text/plain; charset=UTF-8; format=flowed<br><br>Rudolf Gabler wrote the following on 9/11/2013 2:46 AM:<br><blockquote type="cite">the system is running as expected. After approximately the 10 imaps contact suddenly the following occurs:<br><br>Sep 11 09:43:29 xmailer imaps[8168]: DBERROR: SQL query failed: MySQL server has gone away<br>Sep 11 09:43:29 xmailer imaps[8168]: DBERROR: SQL failed SELECT * FROM mailboxes_db WHERE dbkey = 'user?..<br><br>But the local mysql server is o.k. and running. After a restart of cyrus (/etc/init.d/cyrus-imapd restart) everything is working until the next appr. 10 connection times by the user.<br><br>If I use sqlite instead everything is stable for at least a month.<br><br>Any hint what may occur?<br><br></blockquote><br>I'm not familiar with using MySQL for anything more than authentication&nbsp;<br>so I'm not sure how Cyrus makes it's db connections, but is there a&nbsp;<br>limit on the number of allowed client connections in my.cnf - or per&nbsp;<br>user on the MySQL account you're using for Cyrus?<br><br>When Cyrus is broke, can you login to MySQL, use the Cyrus databases,&nbsp;<br>and run the queries that Cyrus would?<br><br>--Blake<br><br><br>------------------------------<br><br>_______________________________________________<br>Info-cyrus mailing list<br><a href="mailto:Info-cyrus@lists.andrew.cmu.edu">Info-cyrus@lists.andrew.cmu.edu</a><br><a href="https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus">https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus</a><br><br><br>End of Info-cyrus Digest, Vol 98, Issue 4<br>*****************************************<br></div></body></html>