Skip to content

Reconnect on lost DB connection #55

Description

@michalbundyra

This functionality allow to enable & configure reconnect functionality using options parameter in adapter.

When you are creating adapter for mysqli:

$adapter = new Adapter([
    'driver' => 'Mysqli',
    'database' => '',
    'username' => '',
    'password' => '',
    'options' => [
        'reconnect_tries' => 3
    ]
]);

You can specify reconnect_tries and if during your work connect will be lost adapter will try automatically reconnect to server.

Fix for #302


Originally posted by @tptrixtop at zendframework/zend-db#307

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions