Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 139
    • Merge requests 139
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • 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
None
Milestone
None
Assign milestone
Time tracking
Source branch: fix/mariadb-1927
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7