Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    mysql connections timing out

    Kopano Groupware Core
    4
    7
    523
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • genesis74
      genesis74 last edited by

      Hi there,

      I noticed recurring timeouts of mysql connections on my server. Here is my process list:

      +-------+--------+-----------+--------+---------+------+----------+------------------+
      | Id    | User   | Host      | db     | Command | Time | State    | Info             |
      +-------+--------+-----------+--------+---------+------+----------+------------------+
      | 11511 | kopano | localhost | kopano | Sleep   | 1319 |          | NULL             |
      | 11513 | kopano | localhost | kopano | Sleep   | 1319 |          | NULL             |
      | 11514 | kopano | localhost | kopano | Sleep   | 1319 |          | NULL             |
      | 11515 | kopano | localhost | kopano | Sleep   |   24 |          | NULL             |
      | 11516 | kopano | localhost | kopano | Sleep   |    4 |          | NULL             |
      | 11517 | kopano | localhost | kopano | Sleep   |   25 |          | NULL             |
      | 11518 | kopano | localhost | kopano | Sleep   |   14 |          | NULL             |
      | 11519 | kopano | localhost | kopano | Sleep   |    4 |          | NULL             |
      | 11520 | kopano | localhost | kopano | Sleep   |   19 |          | NULL             |
      | 11521 | kopano | localhost | kopano | Sleep   |    9 |          | NULL             |
      | 11522 | kopano | localhost | kopano | Sleep   |   14 |          | NULL             |
      | 11523 | kopano | localhost | kopano | Sleep   |    9 |          | NULL             |
      | 11565 | kopano | localhost | kopano | Sleep   | 1221 |          | NULL             |
      | 11566 | kopano | localhost | kopano | Sleep   |  109 |          | NULL             |
      | 12017 | root   | localhost | NULL   | Query   |    0 | starting | show processlist |
      +-------+--------+-----------+--------+---------+------+----------+------------------+
      

      As you can see, four connections are starting to run towards a timeout (which is set to 8 hours as the mysql server default). Looking at the mysql error log I can see those timeouts happening indeed, mostly three at a time.

      2019-08-21T19:22:26.697198Z 2 [Note] Aborted connection 2 to db: 'kopano' user: 'kopano' host: 'localhost' (Got timeout reading communication packets)
      2019-08-21T19:22:26.700024Z 4 [Note] Aborted connection 4 to db: 'kopano' user: 'kopano' host: 'localhost' (Got timeout reading communication packets)
      2019-08-21T19:22:26.776091Z 5 [Note] Aborted connection 5 to db: 'kopano' user: 'kopano' host: 'localhost' (Got timeout reading communication packets)
      
      

      I don’t think this imposes any problem but I am curious what might be the reason for this behaviour.

      mysql 5.7.27
      Kopano 8.7.5
      Ubuntu 18.04

      fbartels 1 Reply Last reply Reply Quote 0
      • Ihon
        Ihon last edited by Ihon

        Hi,

        I have the same effect on MariaDB with the newest Kopano DEV packages.

        Best regards,

        Ihon

        1 Reply Last reply Reply Quote 0
        • fbartels
          fbartels Kopano @genesis74 last edited by

          Hi @genesis74,

          that seems odd. Since you have a subscription, did you get in contact with our support regarding this?

          Regards Felix

          Resources:
          https://kopano.com/blog/how-to-get-kopano/
          https://documentation.kopano.io/
          https://kb.kopano.io/

          Support overview:
          https://kopano.com/support/

          genesis74 1 Reply Last reply Reply Quote 0
          • genesis74
            genesis74 @fbartels last edited by

            Hi @fbartels ,

            no, I didn‘t. Since I have a small installation with only minimum support time I do not want to use it for optimization purpose. Also, I do not expect it to be solved in 30 mins.

            1 Reply Last reply Reply Quote 0
            • jengelh
              jengelh Banned last edited by

              It is conceivable that some threads of kopano-server never get a chance to process any work items, a result of which can be that the mysql connection that belongs to that worker thread accrues long idle times.

              genesis74 1 Reply Last reply Reply Quote 0
              • genesis74
                genesis74 @jengelh last edited by

                Hi @jengelh,

                your post led me to trying to reduce the number of kopano server threads. The result is that the number of mysql connections shown by the mysql process list is decreasing - but the number of connections staying idle for a long time remains constant. Even with only one kopano server thread there are 5 connections to mysql with 3 ones having long idle times and one where the idle time is reset only intermittently. Searching on the web points me to suggestions to check the client code for clean connection handling, especially connection closing. Well … I was hoping to find out if this effect is only happening on very few systems (or only mine) or if it is a common issue. At least @lhon seems to encounter that effect, too.

                1 Reply Last reply Reply Quote 0
                • jengelh
                  jengelh Banned last edited by

                  I see nothing wrong here. Yes, connections will run into timeouts (obviously), but that is a normal and anticipated practice. k-server will just reconnect.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post