Configure the lock provider

Before you run this command, you must do the following or you must install the application:

Secure installation

To use Secure Sockets Layer (SSL), also referred to as HTTPS, for both the Admin and the storefront, you must set all of the following parameters:

  • --use-secure: Set to 1
  • --base-url-secure: Set to a secure URL (that is, starting with https://)
  • --use-secure-admin Set to 1

More details about these parameters can be found later in this topic.

Configure the lock

Configure a lock provider to prevent the launch of duplicate cron jobs and cron groups. (Requires Adobe Commerce 2.2.x, 2.2.5 and later, and 2.3.3 and later.)

Adobe Commerce uses the database to save locks by default. If you have multiple nodes on your servers, we recommend using Zookeeper as the lock provider.

If you are running Adobe Commerce on cloud infrastructure, you do not need to configure lock provider settings. The application configures the file lock provider for Pro projects during the provisioning process. See Cloud variables.

Command usage

bin/magento setup:config:set [--<parameter_name>=<value>, ...]

Parameter descriptions

Lock provider name: db, zookeeper, or file.

The default lock provider: db
The specific db prefix to avoid lock conflicts when using the db lock provider.

The default value: NULL
Host and port to connect to the Zookeeper cluster when you use the zookeeper lock provider.

For example:
Yes, if you set --lock-provider=zookeeper
The path where Zookeeper saves locks.

The default path is: /magento/locks
The path where file locks are saved.
Yes, if you set --lock-provider=file