diff --git a/docker-compose.yml b/docker-compose.yml index 89f55a779a..86cc0d77e4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -75,6 +75,7 @@ services: endpoint_mode: vip environment: - MYSQL_ROOT_PASSWORD=password + - MYSQL_DATABASE=lisk healthcheck: test: ['CMD', 'mysqladmin', 'ping', '-hlocalhost', '-ppassword'] diff --git a/docker/example.env b/docker/example.env index 12f367ec66..f54540b401 100644 --- a/docker/example.env +++ b/docker/example.env @@ -40,7 +40,7 @@ # WS_SERVER_PING_INTERVAL=3000 # WS_SERVER_PING_INTERVAL_BUFFER=1000 # ENDPOINT_INVOKE_MAX_RETRIES=3 -# ENDPOINT_INVOKE_RETRY_DELAY=50 +# ENDPOINT_INVOKE_RETRY_DELAY=1000 # CONNECTOR_EXIT_DELAY_IN_HOURS=0 # Moleculer jobs configuration diff --git a/docker/mysql/read/init/01-databases.sql b/docker/mysql/read/init/01-databases.sql index b82b1200cb..0dc1ead13c 100644 --- a/docker/mysql/read/init/01-databases.sql +++ b/docker/mysql/read/init/01-databases.sql @@ -1,3 +1,6 @@ +-- Create database(s). +CREATE DATABASE IF NOT EXISTS `lisk`; + -- Create `reader` user for read queries and grant read privilages. CREATE USER 'reader'@'%' IDENTIFIED WITH caching_sha2_password BY 'password'; GRANT SELECT ON *.* TO 'reader'@'%'; diff --git a/docs/antora/modules/ROOT/pages/configuration/index.adoc b/docs/antora/modules/ROOT/pages/configuration/index.adoc index ceed08825c..4ee7044fcb 100644 --- a/docs/antora/modules/ROOT/pages/configuration/index.adoc +++ b/docs/antora/modules/ROOT/pages/configuration/index.adoc @@ -442,8 +442,8 @@ By default, it is set to `3`. | `ENDPOINT_INVOKE_RETRY_DELAY` | number | Delay (in milliseconds) between each endpoint invocation request retry. -By default, it is set to `50`. -| 50 +By default, it is set to `1000`. +| 1000 | `CONNECTOR_EXIT_DELAY_IN_HOURS` | number diff --git a/ecosystem.config.js b/ecosystem.config.js index 6613bcda43..00792504cd 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -133,7 +133,7 @@ module.exports = { // WS_SERVER_PING_INTERVAL=3000, // WS_SERVER_PING_INTERVAL_BUFFER=1000, // ENDPOINT_INVOKE_MAX_RETRIES: 3, - // ENDPOINT_INVOKE_RETRY_DELAY: 50, + // ENDPOINT_INVOKE_RETRY_DELAY: 1000, // CONNECTOR_EXIT_DELAY_IN_HOURS: 0, // JOB_INTERVAL_CACHE_CLEANUP: 0, // JOB_SCHEDULE_CACHE_CLEANUP: '0 */12 * * *', diff --git a/services/blockchain-connector/README.md b/services/blockchain-connector/README.md index ce074adf15..93783d6ea2 100644 --- a/services/blockchain-connector/README.md +++ b/services/blockchain-connector/README.md @@ -40,7 +40,7 @@ A list of the most commonly used environment variables is presented below: - `WS_SERVER_PING_INTERVAL`: Interval (in milliseconds) at which the WS server checks for liveliness of all the connected clients. This should not be modified unless explicitly recommended by the development team. By default, it is set to `3000`. - `WS_SERVER_PING_INTERVAL_BUFFER`: A conservative assumption of the latency (in milliseconds) for WS server pings to arrive at the client. By default, it is set to `1000`. - `ENDPOINT_INVOKE_MAX_RETRIES`: Maximum number of endpoint invocation request retries to the node. By default, it is set to `3`. -- `ENDPOINT_INVOKE_RETRY_DELAY`: Delay (in milliseconds) between each endpoint invocation request retry. By default, it is set to `50`. +- `ENDPOINT_INVOKE_RETRY_DELAY`: Delay (in milliseconds) between each endpoint invocation request retry. By default, it is set to `1000`. - `CONNECTOR_EXIT_DELAY_IN_HOURS`: Delay (in hours) after which the blockchain-connector microservice exits. The service should restart automatically if deployed using Docker or PM2. To be removed eventually. To enable it, set it higher than `0`. By default, it is set to `0`. - `JOB_INTERVAL_CACHE_CLEANUP`: Job run interval to cleanup block cache. By default, it is set to `0`. - `JOB_SCHEDULE_CACHE_CLEANUP`: Job run cron schedule to cleanup block cache. By default, it is set to run every 12 hours (`0 */12 * * *`). diff --git a/services/blockchain-connector/config.js b/services/blockchain-connector/config.js index ad8864446f..e32c97d29e 100644 --- a/services/blockchain-connector/config.js +++ b/services/blockchain-connector/config.js @@ -121,7 +121,7 @@ config.apiClient = { pingIntervalBuffer: Number(process.env.WS_SERVER_PING_INTERVAL_BUFFER) || 1000, // in millisecs request: { maxRetries: Number(process.env.ENDPOINT_INVOKE_MAX_RETRIES) || 3, - retryDelay: Number(process.env.ENDPOINT_INVOKE_RETRY_DELAY) || 50, // in millisecs + retryDelay: Number(process.env.ENDPOINT_INVOKE_RETRY_DELAY) || 1000, // in millisecs }, };