---
title: "Broker parameters"
description: "Reference for coradb_broker.conf: broker-wide parameters and per-broker parameters for access, CAS processes, transactions and queries, and logging."
url: "https://www.coradb.ai/manual/admin/config_broker.html"
markdown_url: "https://www.coradb.ai/manual/markdown/admin/config_broker.md"
product: "CoraDB"
version: "1.0"
keywords: "coradb_broker.conf, broker parameters, BROKER_PORT, MAX_NUM_APPL_SERVER, MIN_NUM_APPL_SERVER, CCI_DEFAULT_AUTOCOMMIT, SQL_LOG, SLOW_LOG, KEEP_CONNECTION, SESSION_TIMEOUT"
---

# Broker parameters

The broker configuration file **coradb_broker.conf** is in the **$CORADB/conf** directory. It has a `[broker]` section with parameters common to all brokers, followed by one `[%broker_name]` section for each broker.

## Broker parameter reference

The following table shows the broker parameters available in the broker configuration file (**coradb_broker.conf**). For details, see [Common parameters](https://www.coradb.ai/manual/admin/config_broker.html#common-parameters) and [Parameter by broker](https://www.coradb.ai/manual/admin/config_broker.html#parameter-by-broker). You can temporarily change the parameter of which configuration values can be dynamically changed by using the **broker_changer** utility. To apply configuration values even after restarting all brokers with **coradb broker restart**, you should change the values in the **coradb_broker.conf** file.

**Common (`[broker]`)**

| Use | Parameter | Type | Default | Dynamic change |
|---|---|---|---|---|
| Access | [ACCESS_CONTROL](https://www.coradb.ai/manual/admin/config_broker.html#access_control) | bool | no |  |
| Access | [ACCESS_CONTROL_FILE](https://www.coradb.ai/manual/admin/config_broker.html#access_control_file) | string |  |  |
| Logging | [ADMIN_LOG_FILE](https://www.coradb.ai/manual/admin/config_broker.html#admin_log_file) | string | Log/broker/coradb_broker.log |  |
| Broker server (cora_broker) | [MASTER_SHM_ID](https://www.coradb.ai/manual/admin/config_broker.html#master_shm_id) | int | 30,001 |  |

**Per broker (`[%broker_name]`)**

| Use | Parameter | Type | Default | Dynamic change |
|---|---|---|---|---|
| Access | [ACCESS_LIST](https://www.coradb.ai/manual/admin/config_broker.html#access_list) | string |  |  |
| Access | [ACCESS_MODE](https://www.coradb.ai/manual/admin/config_broker.html#access_mode) | string | RW | yes |
| Access | [BROKER_PORT](https://www.coradb.ai/manual/admin/config_broker.html#broker_port) | int | 30,000(max : 65,535) |  |
| Access | [CONNECT_ORDER](https://www.coradb.ai/manual/admin/config_broker.html#connect_order) | string | SEQ | yes |
| Access | [ENABLE_MONITOR_HANG](https://www.coradb.ai/manual/admin/config_broker.html#enable_monitor_hang) | string | OFF |  |
| Access | [KEEP_CONNECTION](https://www.coradb.ai/manual/admin/config_broker.html#keep_connection) | string | AUTO | yes |
| Access | [MAX_NUM_DELAYED_HOSTS_LOOKUP](https://www.coradb.ai/manual/admin/config_broker.html#max_num_delayed_hosts_lookup) | int | -1 |  |
| Access | [PREFERRED_HOSTS](https://www.coradb.ai/manual/admin/config_broker.html#preferred_hosts) | string |  | yes |
| Access | [RECONNECT_TIME](https://www.coradb.ai/manual/admin/config_broker.html#reconnect_time) | sec | 600 | yes |
| Broker App. Server(CAS) | [APPL_SERVER_MAX_SIZE](https://www.coradb.ai/manual/admin/config_broker.html#appl_server_max_size) | MB | Windows 32bit: 40, Windows 64bit: 80, Linux: 0(max: 2,097,151) | yes |
| Broker App. Server(CAS) | [APPL_SERVER_MAX_SIZE_HARD_LIMIT](https://www.coradb.ai/manual/admin/config_broker.html#appl_server_max_size_hard_limit) | MB | 1,024 | yes |
| Broker App. Server(CAS) | [APPL_SERVER_PORT](https://www.coradb.ai/manual/admin/config_broker.html#appl_server_port) | int | BROKER_PORT+1 |  |
| Broker App. Server(CAS) | [APPL_SERVER_SHM_ID](https://www.coradb.ai/manual/admin/config_broker.html#appl_server_shm_id) | int | 30,000 |  |
| Broker App. Server(CAS) | [AUTO_ADD_APPL_SERVER](https://www.coradb.ai/manual/admin/config_broker.html#auto_add_appl_server) | string | ON |  |
| Broker App. Server(CAS) | [MAX_NUM_APPL_SERVER](https://www.coradb.ai/manual/admin/config_broker.html#max_num_appl_server) | int | 40 |  |
| Broker App. Server(CAS) | [MIN_NUM_APPL_SERVER](https://www.coradb.ai/manual/admin/config_broker.html#min_num_appl_server) | int | 5 |  |
| Broker App. Server(CAS) | [TIME_TO_KILL](https://www.coradb.ai/manual/admin/config_broker.html#time_to_kill) | sec | 120 | yes |
| Transaction & Query | [CCI_DEFAULT_AUTOCOMMIT](https://www.coradb.ai/manual/admin/config_broker.html#cci_default_autocommit) | string | ON |  |
| Transaction & Query | [LONG_QUERY_TIME](https://www.coradb.ai/manual/admin/config_broker.html#long_query_time) | sec | 60(max: 86,400) | yes |
| Transaction & Query | [LONG_TRANSACTION_TIME](https://www.coradb.ai/manual/admin/config_broker.html#long_transaction_time) | sec | 60(max: 86,400) | yes |
| Transaction & Query | [MAX_PREPARED_STMT_COUNT](https://www.coradb.ai/manual/admin/config_broker.html#max_prepared_stmt_count) | int | 2,000(min: 1) | yes |
| Transaction & Query | [MAX_QUERY_TIMEOUT](https://www.coradb.ai/manual/admin/config_broker.html#max_query_timeout) | sec | 0(max: 86,400) | yes |
| Transaction & Query | [SESSION_TIMEOUT](https://www.coradb.ai/manual/admin/config_broker.html#session_timeout) | sec | 300 | yes |
| Transaction & Query | [STATEMENT_POOLING](https://www.coradb.ai/manual/admin/config_broker.html#statement_pooling) | string | ON | yes |
| Transaction & Query | [JDBC_CACHE](https://www.coradb.ai/manual/admin/config_broker.html#jdbc_cache) | string | OFF | yes |
| Transaction & Query | [JDBC_CACHE_HINT_ONLY](https://www.coradb.ai/manual/admin/config_broker.html#jdbc_cache_hint_only) | string | OFF | yes |
| Transaction & Query | [JDBC_CACHE_LIFE_TIME](https://www.coradb.ai/manual/admin/config_broker.html#jdbc_cache_life_time) | sec | 1000 | yes |
| Transaction & Query | [TRIGGER_ACTION](https://www.coradb.ai/manual/admin/config_broker.html#trigger_action) | string | ON | yes |
| Logging | [ACCESS_LOG](https://www.coradb.ai/manual/admin/config_broker.html#access_log) | string | OFF | yes |
| Logging | [ACCESS_LOG_DIR](https://www.coradb.ai/manual/admin/config_broker.html#access_log_dir) | string | Log/broker |  |
| Logging | [ACCESS_LOG_MAX_SIZE](https://www.coradb.ai/manual/admin/config_broker.html#access_log_max_size) | KB | 10M(max: 2G) | yes |
| Logging | [ERROR_LOG_DIR](https://www.coradb.ai/manual/admin/config_broker.html#error_log_dir) | string | Log/broker/error_log | yes |
| Logging | [LOG_DIR](https://www.coradb.ai/manual/admin/config_broker.html#log_dir) | string | Log/broker/sql_log | yes |
| Logging | [SLOW_LOG](https://www.coradb.ai/manual/admin/config_broker.html#slow_log) | string | ON | yes |
| Logging | [SLOW_LOG_DIR](https://www.coradb.ai/manual/admin/config_broker.html#slow_log_dir) | string | Log/broker/sql_log | yes |
| Logging | [SQL_LOG](https://www.coradb.ai/manual/admin/config_broker.html#sql_log) | string | ON | yes |
| Logging | [SQL_LOG_MAX_SIZE](https://www.coradb.ai/manual/admin/config_broker.html#sql_log_max_size) | KB | 10,000 | yes |
| Etc | [MAX_STRING_LENGTH](https://www.coradb.ai/manual/admin/config_broker.html#max_string_length) | int | -1 |  |
| Etc | [SERVICE](https://www.coradb.ai/manual/admin/config_broker.html#service) | string | ON |  |
| Etc | [SSL](https://www.coradb.ai/manual/admin/config_broker.html#ssl) | string | OFF |  |
| Etc | [SOURCE_ENV](https://www.coradb.ai/manual/admin/config_broker.html#source_env) | string | coradb.env |  |

## Default coradb_broker.conf

The **coradb_broker.conf** file installed with CoraDB defines a `[%query_editor]` broker on port 30000 and a `[%BROKER1]` broker on port 33000:

```ini
[broker]
MASTER_SHM_ID           =30001
ADMIN_LOG_FILE          =log/broker/coradb_broker.log

[%query_editor]
SERVICE                 =ON
SSL                     =OFF
BROKER_PORT             =30000
MIN_NUM_APPL_SERVER     =5
MAX_NUM_APPL_SERVER     =40
APPL_SERVER_SHM_ID      =30000
LOG_DIR                 =log/broker/sql_log
ERROR_LOG_DIR           =log/broker/error_log
SQL_LOG                 =ON
TIME_TO_KILL            =120
SESSION_TIMEOUT         =300
KEEP_CONNECTION         =AUTO
CCI_DEFAULT_AUTOCOMMIT  =ON

[%BROKER1]
SERVICE                 =ON
SSL                     =OFF
BROKER_PORT             =33000
MIN_NUM_APPL_SERVER     =5
MAX_NUM_APPL_SERVER     =40
APPL_SERVER_SHM_ID      =33000
LOG_DIR                 =log/broker/sql_log
ERROR_LOG_DIR           =log/broker/error_log
SQL_LOG                 =ON
TIME_TO_KILL            =120
SESSION_TIMEOUT         =300
KEEP_CONNECTION         =AUTO
CCI_DEFAULT_AUTOCOMMIT  =ON
```

## Using another configuration file

You can specify the location of broker configuration file (**coradb_broker.conf**) file by using the **CORADB_BROKER_CONF_FILE** variable. The variable is used when executing several brokers with different configuration.

## Common parameters

The following are parameters commonly applied to entire brokers; it is written under \[broker\] section.

### Access

#### ACCESS_CONTROL

**ACCESS_CONTROL** is a parameter used to limit applications which are trying to connect a broker. The default value is **OFF**. For details, see [Limiting broker access](https://www.coradb.ai/manual/admin/control_broker.html#limiting-broker-access).

#### ACCESS_CONTROL_FILE

**ACCESS_CONTROL_FILE** is a parameter to configure the name of a file in which a database name, database user ID, and the list of IPs are stored. List of IPs can be written up to the maximum of 256 lines per \<*db_name*\>:\<*db_user*\> in a broker. For details, see [Limiting broker access](https://www.coradb.ai/manual/admin/control_broker.html#limiting-broker-access).

### Logging

#### ADMIN_LOG_FILE

**ADMIN_LOG_FILE** is a parameter to configure the file in which time of running CoraDB broker is stored. The default value is a **log/broker/coradb_broker.log** file.

### Broker server(cora_broker)

#### MASTER_SHM_ID

**MASTER_SHM_ID** is a parameter used to specify the identifier of shared memory which is used to manage the CoraDB broker. Its value must be unique in the system. The default value is **30001**.

## Parameter by broker

The following describes parameters to configure the environment variables of brokers; each parameter is located under *\[%broker_name\]*. The maximum length of *broker_name* is 63 characters in English.

### Access

#### ACCESS_LIST

**ACCESS_LIST** is a parameter to configure the name of a file where the list of IP addresses of an application which allows access to the CoraDB broker is stored. To allow access by IP addresses access 210.192.33.\* and 210.194.34.\*, store them to a file (ip_lists.txt) and then assign the file name with the value of this parameter.

#### ACCESS_MODE

**ACCESS_MODE** is a parameter to configure default mode of the broker. The default value is **RW**. For details, see *coradb_broker.conf*.

#### BROKER_PORT

**BROKER_PORT** is a parameter to configure the port number of the broker; the value must be unique and smaller than 65,535. The default port value of **query_editor**' broker is **30,000** and the port value of the **broker1** is **33,000**.

#### CONNECT_ORDER

**CONNECT_ORDER** is a parameter to specify whether a CAS tries to connect to one of hosts in the order or randomly in **$CORADB_DATABASES/databases.txt**, when a CAS decides the order of connecting to a host. The default is **SEQ**; a CAS tries to connect to a host in the order. if this value is **RANDOM**, a CAS tries to connect to a host randomly. If **PREFERRED_HOSTS** parameter is specified, firstly a CAS tries to connect to one of hosts specified in **PREFERRED_HOSTS**, then uses db-host values in **$CORADB_DATABASES/databases.txt** only when the connection is failed.

#### ENABLE_MONITOR_HANG

**ENABLE_MONITOR_HANG** is a parameter to configure whether to block the access from the application to the broker or not, when more than a certain ratio of CASes on that broker are hung. If the **ENABLE_MONITOR_HANG** parameter value is **ON**, blocking feature is processed. The default value is **OFF**. If it is **OFF**, don't do the behavior.

The broker process judges the CAS as hung if the hanging status of the CAS keeps more than one minute, then block the access from applications to that broker; it brings the behavior which the applications try to access to the alternative hosts(altHosts) configured by the connection URL.

#### KEEP_CONNECTION

**KEEP_CONNECTION** is a parameter to configure the way of connection between CAS and application clients; it is set to one of the following: **ON** or **AUTO**. If this value is **ON**, it is connected in connection unit. If it is **AUTO** and the number of servers is more than that of clients, transaction unit is used; in the reverse case, connection unit is used. The default value is **AUTO**.

#### MAX_NUM_DELAYED_HOSTS_LOOKUP

See *MAX_NUM_DELAYED_HOSTS_LOOKUP* for further information.

#### PREFERRED_HOSTS

**PREFERRED_HOSTS** is a parameter to specify the order of a host to which a CAS tries to connect in a first priority. If the connection is failed after trying connection in the order specified in **PREFERRED_HOSTS**, a CAS tries to connect to the one of hosts specified in **$CORADB_DATABASES/databases.txt**. The default value is **NULL**. For details, see *coradb_broker.conf*.

#### RECONNECT_TIME

If the time specified by **RECONNECT_TIME** is elapsed in a certain status, CAS will try to reconnect to the other DB server. The default of this parameter is **600s(10min)**. You can set a unit as ms, s, min or h, which stands for milliseconds, seconds, minutes or hours respectively. If you omit the unit, s will be applied.

a certain status which CAS tries to reconnect is as follows.

- When CAS is connected to not a DB server in **PREFERRED_HOSTS**, but the DB server of db-host in databases.txt.

When **RECONNECT_TIME** is 0, CAS does not try to reconnect.

The default is **OFF**.

> **Note:**
>


### Broker app. server(CAS)

#### APPL_SERVER_MAX_SIZE

**APPL_SERVER_MAX_SIZE** is a parameter to configure the maximum size of the process memory usage handled by CAS. You can set a unit as B, K, M or G, which stands for bytes, kilobytes(KB), megabytes(MB) or gigabytes(GB) respectively. If you omit the unit, M will be applied.

Specifying this parameter makes transactions terminate (commit or rollback) only when it is executed by a user. In contrast to this, specifying **APPL_SERVER_MAX_SIZE_HARD_LIMIT** makes transactions forcibly terminate (rollback) and restart CAS.

Note that the default values of Windows and Linux are different from each other.

For 32-bit Windows, the default value is **40** MB; for 64-bit Windows, it is **80** MB. The maximum value is the same on Windows and Linux as 2,097,151 MB. When current process size exceeds the value of **APPL_SERVER_MAX_SIZE**, broker restarts the corresponding CAS.

For Linux, the default value of **APPL_SERVER_MAX_SIZE** is **0**; CAS restarts in the following conditions.

- **APPL_SERVER_MAX_SIZE** is zero or negative: At the point when current process size becomes twice as large as initial memory
- **APPL_SERVER_MAX_SIZE** is positive: At the point when it exceeds the value specified in **APPL_SERVER_MAX_SIZE**

> **Note:**
> Be careful not to make the value too small because application servers may restart frequently and unexpectedly. In general, the value of **APPL_SERVER_MAX_SIZE_HARD_LIMIT** is greater than that of **APPL_SERVER_MAX_SIZE**. For details, see description of **APPL_SERVER_MAX_SIZE_HARD_LIMIT**.


#### APPL_SERVER_MAX_SIZE_HARD_LIMIT

**APPL_SERVER_MAX_SIZE_HARD_LIMIT** is a parameter to configure the maximum size of process memory usage handled by CAS. You can set a unit as B, K, M or G, which stands for bytes, kilobytes(KB), megabytes(MB) or gigabytes(GB) respectively. If you omit the unit, M will be applied. The default value is **1,024** (MB), and the maximum value is 2,097,151 (MB).

Specifying this parameter makes transactions being processed forcibly terminate (rollback) and restart CAS. In contrast to this, specifying **APPL_SERVER_MAX_SIZE** makes transactions terminate only when it is executed by a user.

> **Note:**
> Be careful not to make the value too small because application servers may restart frequently and unexpectedly. When restarting CAS, **APPL_SERVER_MAX_SIZE** is specified to wait for normal termination of transactions although memory usage increases; **APPL_SERVER_MAX_SIZE_HARD_LIMIT** is specified to forcibly terminate transactions if memory usage exceeds the maximum value allowed. Therefore, in general, the value of **APPL_SERVER_MAX_SIZE_HARD_LIMIT** is greater than that of **APPL_SERVER_MAX_SIZE**.


#### APPL_SERVER_PORT

**APPL_SERVER_PORT** is a parameter to configure the connection port of CAS that communicates with application clients; it is used only in Windows. In Linux, the application clients and CAS use the UNIX domain socket for communication; therefore, **APPL_SERVER_PORT** is not used. The default value is determined by adding plus 1 to the **BROKER_PORT** parameter value. The number of ports used is the same as the number of CAS, starting from the specified port's number plus 1. For example, when the value of **BROKER_PORT** is 30,000 and the **APPL_SERVER_PORT** parameter value has been configured, and if the **MIN_NUM_APPL_SERVER** value is 5, five CASes uses the ports numbering between 30,001 and 30,005, respectively. The maximum number of CAS specified in the **MAX_NUM_APPL_SERVER** parameter in **coradb_broker_conf**; therefore, the maximum number of connection ports is also determined by the value of **MAX_NUM_APPL_SERVER** parameter.

On the Windows system, if a firewall exists between an application and a CoraDB broker, the communication port specified in **BROKER_PORT** and **APPL_SERVER_PORT** must be opened.

> **Note:**
> For the **CORADB_TMP** environment variable that specifies the UNIX domain socket file path of **cora_master** and **cora_broker** processes, see [Configuring environment variables](https://www.coradb.ai/manual/env.html).


#### APPL_SERVER_SHM_ID

**APPL_SERVER_SHM_ID** is a parameter to configure the ID of shared memory used by CAS; the value must be unique within system. The default value is the same as the port value of the broker.

#### AUTO_ADD_APPL_SERVER

**AUTO_ADD_APPL_SERVER** is a parameter to configure whether CAS increase automatically to the value specified in **MAX_NUM_APPL_SERVER** in case of needed; the value will be either **ON** or **OFF** (default: **ON**).

#### MAX_NUM_APPL_SERVER

**MAX_NUM_APPL_SERVER** is a parameter to configure the maximum number of simultaneous connections allowed. The default value is **40**.

#### MIN_NUM_APPL_SERVER

**MIN_NUM_APPL_SERVER** is a parameter to configure the minimum number of CAS even if any request to connect the broker has not been made. The default value is **5**.

#### TIME_TO_KILL

**TIME_TO_KILL** is a parameter to configure the time to remove CAS in idle state among CAS added dynamically. You can set a unit as ms, s, min or h, which stands for milliseconds, seconds, minutes or hours respectively. If you omit the unit, s will be applied. The default value is **120** (seconds).

An idle state is one in which the server is not involved in any jobs. If this state continues exceeding the value specified in **TIME_TO_KILL**, CAS is removed.

The value configured in this parameter affects only CAS added dynamically, so it applies only when the **AUTO_ADD_APPL_SERVER** parameter is configured to **ON**. Note that times to add or remove CAS will be increased more if the **TIME_TO_KILL** value is so small.

### Transaction & query

#### CCI_DEFAULT_AUTOCOMMIT

**CCI_DEFAULT_AUTOCOMMIT** is a parameter to configure whether to make application implemented in CCI interface or CCI-based interface such as PHP, OLE DB, Perl, Python, and Ruby commit automatically. The default value is **ON**. This parameter does not affect applications implemented in JDBC.

If the **CCI_DEFAULT_AUTOCOMMIT** parameter value is **OFF**, the broker application server (CAS) process is occupied until the transaction is terminated. Therefore, it is recommended to execute commit after completing fetch when executing the **SELECT** statement.

#### LONG_QUERY_TIME

**LONG_QUERY_TIME** is a parameter to configure execution time of query which is evaluated as long-duration query. You can set a unit as ms, s, min or h, which stands for milliseconds, seconds, minutes or hours respectively. If you omit the unit, milliseconds(ms) will be applied. The default value is **60** (seconds) and the maximum value is 86,400(1 day). When you run a query and this query's running time takes more than the specified time, a value of LONG-Q, which is printed out from "coradb broker status" command, is increased 1; this SQL is written to SLOW log file ($CORADB/log/broker/sql_log/\*.slow.log) of CAS. See [SLOW_LOG](https://www.coradb.ai/manual/admin/config_broker.html#slow_log).

This value can be valued in milliseconds with a decimal separator. For example, the value can be configured into 0.5 to configure 500 msec.

Note that if a parameter value is configured to **0**, a long-duration query is not evaluated.

#### LONG_TRANSACTION_TIME

**LONG_TRANSACTION_TIME** is a parameter to configure execution time of query which is evaluated as long-duration transaction. The default value is **60** (seconds) and the maximum value is 86,400(1 day).

This value can be valued in milliseconds with a decimal separator. For example, the value can be configured into 0.5 to configure 500 msec.

Note that if a parameter value is configured to **0**, a long-duration transaction is not evaluated.

#### MAX_PREPARED_STMT_COUNT

**MAX_PREPARED_STMT_COUNT** is a parameter used to limit the number of prepared statements by user (application) access. The default value is **2,000** and the minimum value is 1. The problem in which prepared statement exceeding allowed memory is mistakenly generated by system can be prohibited by making users specify the parameter value.

> **Note:**
> When you want to change the value of **MAX_PREPARED_STMT_COUNT** dynamically by **broker_changer** command, this can be changed only when this is bigger than the existing value; this cannot be changed when this is smaller than the existing value.


#### MAX_QUERY_TIMEOUT

**MAX\_ QUERY_TIMEOUT** is a parameter to configure timeout value of query execution. When time exceeds a value specified in this parameter after starting query execution, the query being executed stops and rolls back. You can set a unit as ms, s, min or h, which stands for milliseconds, seconds, minutes or hours respectively. If you omit the unit, milliseconds(ms) will be applied. The default value is **0** (seconds) and it means infinite waiting. The value range is available from 0 to 86,400 seconds(one day).

The smallest value (except 0) between the **MAX_QUERY_TIMEOUT** value and query timeout value of an application is applied if query timeout is configured in an application.

> **Note:**
> See the [cci_connect_with_url](https://www.coradb.ai/manual/api/cciapi.html#cci_connect_with_url) and [cci_set_query_timeout](https://www.coradb.ai/manual/api/cciapi.html#cci_set_query_timeout) functions to configure query timeout of CCI applications. For configuring query timeout of JDBC applications, see the **setQueryTimeout** method.


#### SESSION_TIMEOUT

**SESSION_TIMEOUT** is a parameter to configure timeout value for the session of the broker. You can set a unit as ms, s, min or h, which stands for milliseconds, seconds, minutes or hours respectively. If you omit the unit, milliseconds(ms) will be applied. The default value is **300** (seconds).

If there is no response to the job request for the specified time period, session will be terminated. If a value exceeds the value specified in this parameter without any action taken after starting transaction, the connections are terminated.

#### STATEMENT_POOLING

**STATEMENT_POOLING** is a parameter to configure whether to use statement pool feature. The default value is **ON**.

CoraDB closes all handles of prepared statement in the corresponding client sessions when transaction commit or rollback is made. If the value of **STATEMENT_POOLING** is set to **ON**, the handles are reusable because they are maintained in the pool. Therefore, in an environment where libraries, such as general applications reusing prepared statement or DBCP where statement pooling is implemented is applied, the default configuration (**ON**) should be maintained.

If the prepared statement is executed after transaction commit or termination while **STATEMENT_POOLING** is set to **OFF**, the following message will be displayed.

``` text
Caused by: coradb.jdbc.driver.CoraDBException: Attempt to access a closed Statement.
```

#### JDBC_CACHE

**JDBC_CACHE** is a parameter to configure whether to use result-cache feature. The default value is **OFF**.

If the parameter is **ON**, all of SELECT queries from JDBC is cached at client for life time which is configured by **JDBC_CACHE_LIFE_TIME**

#### JDBC_CACHE_HINT_ONLY

**JDBC_CACHE_HINT_ONLY** is a parameter to configure whether to use result-cache feature only by query hint /\*+ JDBC_CACHE \*/.

It works as if the parameter is **ON** when the query hint is given.

#### JDBC_CACHE_LIFE_TIME

**JDBC_CACHE_HINT_ONLY** is a parameter to configure JDBC client's result-cache life time. The default value is 1000 (sec).

For only cache life time, the result-cache is available. After the cache lifetime expired, the prior cached results are no more available and a new result is cached.

The cache life time works only when the parameter **JDBC_CACHE** or **JDBC_CACHE_HINT_ONLY** is configured to "ON".

**WARNING**

**JDBC_CACHE**, **JDBC_CACHE_HINT_ONLY**, and **JDBC_CACHE_LIFE_TIME** parameters are meaningless

when the system parameter both of **max_query_cache_entries** and **query_cache_size_in_pages** are not set to positive value.

For result cache working, the SELECT query must include query hint /\*+ QUERY_CACHE \*/ together with these JDBC related parameter setting.

#### TRIGGER_ACTION

Turn on or off of the trigger's action about the broker which specified this parameter. Specify **ON** or **OFF** as a value; The default is **ON**.

### Logging

#### ACCESS_LOG

**ACCESS_LOG** is a parameter to configure whether to store the access log of the broker. The default value is **OFF**. The name of the access log file for the broker is *broker_name***.access** and the file is stored under **$CORADB/log/broker** directory.

#### ACCESS_LOG_DIR

**ACCESS_LOG_DIR** specifies the directory for broker access logging files(**ACCESS_LOG**) to be created. The default is **log/broker**.

#### ACCESS_LOG_MAX_SIZE

**ACCESS_LOG_MAX_SIZE** specifies the maximum size of broker access logging files(**ACCESS_LOG**); if a broker access logging file is bigger than a specified size, this file is backed up into the name of *broker_name***.access.***YYYYMMDDHHMISS*, then logging messages are written to the new file(`broker_name`.**access**). The default is 10M and the maximum is 2G. It can be dynamically changed during operating a broker.

#### ERROR_LOG_DIR

**ERROR_LOG_DIR** is a parameter to configure default directory in which error logs about broker is stored. The default value is **log/broker/error_log**. The log file name for the broker error is *broker\_ name_id.err*.

#### LOG_DIR

**LOG_DIR** is a parameter to configure the directory where SQL logs are stored. The default value is **log/broker/sql_log**. The file name of the SQL logs is *broker_name_id.sql.log*.

#### SLOW_LOG

**SLOW_LOG** is a parameter to configure whether to log. The default value is **ON**. If the value is **ON**, long transaction query which exceeds the time specified in **LONG_QUERY_TIME** or query where an error occurred is stored in the **SLOW SQL** log file. The name of file created is *broker_name_id.slow.log* and it is located under **SLOW_LOG_DIR**.

#### SLOW_LOG_DIR

**SLOW_LOG_DIR** is a parameter to configure the location of directory where the log file is generated. The default value is **log/broker/sql_log**.

#### SQL_LOG

**SQL_LOG** is a parameter to configure whether to leave logs for SQL statements processed by CAS when CAS handles requests from a client. The default value is **ON**. When this parameter is configured to **ON**, all logs are stored. The log file name becomes *broker_name_id.sql.log*. The file is created in the **log/broker/sql_log** directory under the installation directory. The parameter values are as follows:

- **OFF** : Does not leave any logs.
- **ERROR** : Stores logs for queries which occur an error. only queries where an error occurs.
- **NOTICE** : Stores logs for the long-duration execution queries which exceeds the configured time/transaction, or leaves logs for queries which occur an error.
- **TIMEOUT** : Stores logs for the long-duration execution queries which exceeds the configured time/transaction.
- **ON** / **ALL** : Stores all logs.

#### SQL_LOG_MAX_SIZE

**SQL_LOG_MAX_SIZE** is a parameter to configure the maximum size of the SQL log file. You can set a unit as B, K, M or G, which stands for bytes, kilobytes(KB) or megabytes(MB) or gigabytes(GB) respectively. If you omit the unit, M will be applied. The default value is **10,000**\* (KB).

- If the size of the SQL log file, which is created when the **SQL_LOG** parameter is configured to **ON**, reaches to the size configured by the parameter, *broker_name_id.sql.log.bak* is created.
- If the size of the SLOW SQL log file, which is created when the **SLOW_LOG** parameter is configured to **ON**, reaches to the size configured by the parameter, *broker_name_id.slow.log.bak* is created.

### Etc

#### MAX_STRING_LENGTH

**MAX_STRING_LENGTH** is a parameter to configure the maximum string length for BIT, VARBIT, CHAR and VARCHAR data types. If the value is **-1**, which is the default value, the length defined in the database is used. If the value is **100**, the value acts like 100 being applied even when a certain attribute is defined as VARCHAR(1000).

#### SERVICE

**SERVICE** is a parameter to configure whether to run the broker. It can be either **ON** or **OFF**. The default value is **ON**. The broker can run only when this value is configured to **ON**.

#### SSL

**SSL** is a parameter to configure whether to apply packet encryption (**SSL**) to the broker. It can be either **ON** or **OFF**. The default value is **OFF**. When this value is configured to **ON**, packet encryption using **TLS** will be applied to the broker/CAS.

> **Warning:**
> When the broker is configured to do **TLS** (**SSL=ON**), clients such as **jdbc** client must connect in encryption mode, otherwise the connection request to the broker will be rejected. The opposite is also true. The connection request of SSL clients to the non-SSL broker will be rejected.


#### SOURCE_ENV

**SOURCE_ENV** is a parameter used to determine the file where the operating system variable for each broker is configured. The extension of the file must be **env**. All parameters specified in **coradb.conf** can also be configured by environment variables. For example, the **lock_timeout** parameter in **coradb.conf** can also be configured by the **CORADB_LOCK_TIMEOUT** environment variable. As another example, to block execution of DDL statements on broker1, you can configure **CORADB_BLOCK_DDL_STATEMENT** to 1 in the file specified by **SOURCE_ENV**.

An environment variable, if exists, has priority over **coradb.conf**. The default value is **coradb.env**.
