Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 141
    • Merge requests 141
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !1784

Merged
Created May 10, 2023 by Jérome Perrin@jeromeOwner

ZMySQLDA: reconnect on mariadb's Connection was killed

  • Overview 0
  • Commits 1
  • Pipelines 3
  • Changes 1

After server restarts, mariadb uses an error 1927 which is mariadb specific, with no corresponding constant in CR module when server restart. This is the case at least with mariadb 10.3.38.

This fix the following problem:

  • start zope and use mariadb connection
  • restart mariadb
  • use mariadb connection again, see an error:
    Error Type: OperationalError
    Error Value: (1927, 'Connection was killed')

This change to treat 1927 as an error for which we can reconnect and retry the query. Some other connectors do it, for example sqlalchemy in https://github.com/sqlalchemy/sqlalchemy/issues/5493

Edited May 11, 2023 by Jérome Perrin
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix/mariadb-1927
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7