Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • None
    • N/A
    • Protocol
    • None
    • 3.12

    Description

      We're attempting to migrate away from the mysqldb connector to mariadb with sqlalchemy. When populating our tables with initial data we consistently get a "mariadb.OperationalError: Write error: Broken pipe (32)" exception (the mysqldb connector worked fine). Increasing the max_allowed_packet seems to help a bit, but we don't make it through our entire dataset. Are there any other options/arguments that may help here? Thanks!

      Attachments

        Activity

          georg Georg Richter added a comment -

          Usually a broken pipe error indicates that the connection was closed by server. Did you check the server logs?

          Please also read: https://mariadb-corporation.github.io/mariadb-connector-python/bugs.html#how-to-report-a-bug

          georg Georg Richter added a comment - Usually a broken pipe error indicates that the connection was closed by server. Did you check the server logs? Please also read: https://mariadb-corporation.github.io/mariadb-connector-python/bugs.html#how-to-report-a-bug
          jmwhite08 Joseph White added a comment -

          Thanks for the quick reply. There's nothing too telling in the mysql logs:

          2024-09-12 12:20:27 40 [Warning] Could not write packet: fd: 2112  state: 218  errno: 1  vio_errno: 110  length: 1160
          2024-09-12 12:20:27 40 [ERROR] mariadbd: Got an error writing communication packets
          2024-09-12 12:20:27 40 [Warning] Aborted connection 40 to db: 'data' user: 'dbuser' host: 'localhost' (Unknown error)
          

          Here's the stacktrace from our app:

          2024-09-12T12:20:28.045: Traceback (most recent call last):
          2024-09-12T12:20:28.045:  File "/opt/python3-virtualenv/lib64/python3.12/site-packages/sqlalchemy/engine/base.py", line 2118, in _exec_insertmany_context
          2024-09-12T12:20:28.045:    dialect.do_execute(
          2024-09-12T12:20:28.045:  File "/opt/python3-virtualenv/lib64/python3.12/site-packages/sqlalchemy/engine/default.py", line 941, in do_execute
          2024-09-12T12:20:28.045:    cursor.execute(statement, parameters)
          2024-09-12T12:20:28.045:  File "/opt/python3-virtualenv/lib64/python3.12/site-packages/mariadb/cursors.py", line 313, in execute
          2024-09-12T12:20:28.045:    self._execute_binary()
          2024-09-12T12:20:28.045: mariadb.OperationalError: Write error: Broken pipe (32)
          

          jmwhite08 Joseph White added a comment - Thanks for the quick reply. There's nothing too telling in the mysql logs: 2024-09-12 12:20:27 40 [Warning] Could not write packet: fd: 2112 state: 218 errno: 1 vio_errno: 110 length: 1160 2024-09-12 12:20:27 40 [ERROR] mariadbd: Got an error writing communication packets 2024-09-12 12:20:27 40 [Warning] Aborted connection 40 to db: 'data' user: 'dbuser' host: 'localhost' (Unknown error) Here's the stacktrace from our app: 2024-09-12T12:20:28.045: Traceback (most recent call last): 2024-09-12T12:20:28.045: File "/opt/python3-virtualenv/lib64/python3.12/site-packages/sqlalchemy/engine/base.py", line 2118, in _exec_insertmany_context 2024-09-12T12:20:28.045: dialect.do_execute( 2024-09-12T12:20:28.045: File "/opt/python3-virtualenv/lib64/python3.12/site-packages/sqlalchemy/engine/default.py", line 941, in do_execute 2024-09-12T12:20:28.045: cursor.execute(statement, parameters) 2024-09-12T12:20:28.045: File "/opt/python3-virtualenv/lib64/python3.12/site-packages/mariadb/cursors.py", line 313, in execute 2024-09-12T12:20:28.045: self._execute_binary() 2024-09-12T12:20:28.045: mariadb.OperationalError: Write error: Broken pipe (32)
          georg Georg Richter added a comment -

          Closing ticket as "Not a Bug"

          As the server log indicates, a timeout (errno=110) occurred, and afterwards the server closes the connection, which results in a broken pipe error on client side.

          georg Georg Richter added a comment - Closing ticket as "Not a Bug" As the server log indicates, a timeout (errno=110) occurred, and afterwards the server closes the connection, which results in a broken pipe error on client side.

          People

            georg Georg Richter
            jmwhite08 Joseph White
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.