Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

Parameter by Broker

The following describes parameters to configure the environment variables of Brokers; each parameter is located under [%broker_name].

SERVICE

SERVICE is a parameter that determines whether to run the given Broker. It can be configured to either ON or OFF. The default value is ON. The Broker can run only when this parameter is configured to ON.

BROKER_PORT

BROKER_PORT is a parameter that configures the port number of the given Broker. Its value must be unique in the system and equal to or smaller than 65,535. By default, the broker port for query_editor is configured to 30000, and the port for broker1 is configured to 33000.

MIN_NUM_APPL_SERVER

MIN_NUM_APPL_SERVER is a parameter that configures the minimum number of application servers (CAS) even if any request to connect the broker has not been made. The default value is 5.

MAX_NUM_APPL_SERVER

MAX_NUM_APPL_SERVER is a parameter that configures the maximum number of application servers (CAS). The default value is 40. In an evnironment where connection pool is maintained by using a middleware such as WAS, you must specify the value of MAX_NUM_APPL_SERVER parameter as same as that of connection pool.

APPL_SERVER_SHM_ID

APPL_SERVER_SHM_ID is a parameter that configures the shared memory ID to be used by application servers (CAS). Its value must be unique in the system. The default value is the same as the port of the given Broker.

APPL_SERVER_MAX_SIZE

APPL_SERVER_MAX_SIZE is a parameter that specifies the maximum size of the process memory usage provided by the application server (CAS). The unit is MB. This value should be configured in the consideration of server operation environment because it affects the policy, CAS restart, in force. Especially, if you configure this value too low, applications can frequently be restarted. Note that the default value for Windows and Linux is different.
For Windows, the 32-bit CUBRID has 40 (MB) for the APPL_SERVER_MAX_SIZE value by default; 64-bit CUBRID has 80 (MB). If the current process memory usage exceeds the value of APPL_SERVER_MAX_SIZE, the Broker restarts the application server. For Linux, 0 is the default value for APPL_SERVER_MAX_SIZE; and it restarts the application server in the following conditions:

  • Zero or negative : In case the current process is twice as large as the initial memory
  • Positive : In case a value exceeds the number specified in APPL_SERVER_MAX_SIZE
LOG_DIR

LOG_DIR is a parameter that specifies 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.

ERROR_LOG_DIR

ERROR_LOG_DIR is a parameter that specifies the directory where error logs for the Broker are stored. The default value is log/broker/error_log. The name of the error log file for the Broker is broker_ name_id.err.

SQL_LOG

SQL_LOG is a parameter that determines whether to leave logs for SQL statements processed by the application server (CAS) when an application server handles requests from a client. The default value is ON. When this parameter is configured to ON, all logs are stored. 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 : Leaves logs for queries which occur an error. only queries where an error occurs
  • NOTICE : Leaves logs for the long-duration execution queries which exceeds the configured time/transaction, or leaves logs for queries which occur an error
  • TIMEOUT : Leaves logs for the long-duration execution queries which exceeds the configured time/transaction
  • ON/ALL : Leaves all logs
TIME_TO_KILL

TIME_TO_KILL is a parameter that configures the time to remove application servers (CAS) in idle state among application servers added dynamically. The default value is 120 (sec). 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, the application server (CAS) is added or removed.

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

SESSION_TIMEOUT

SESSION_TIMEOUT is a parameter that configures a timeout value for the session of the given Broker. The default value is 300 (sec). The given session is terminated if there is no response to the job request for the specified time period.

KEEP_CONNECTION

KEEP_CONNECTION is a parameter that specifies how application servers (CAS) and application clients are connected. It can be configured to ON, OFF or AUTO. If this parameter is configured to OFF, clients are connected to an application server in a transaction unit. If it is configured to ON, they are connected in a connection unit. If it is configured to AUTO, and then the number of application servers is more than that of clients, it will act as if ON; in the reverse case that clients are more than CASs, it will act as if OFF. The default value is AUTO.

ACCESS_LIST

ACCESS_LIST is a parameter that specifies the name of the file where IP addresses of application client which allows access of the CUBRID Broker is to be saved. To allow access by IP addresses 210.192.33.* and 210.194.34.*, save them to a file (ip_lists.txt) and then configure the file name with the value of this parameter.

ACCESS_LOG

ACCESS_LOG is a parameter that specifies whether or not to store access log. The default value is ON. The name of the access log file for the Broker is broker_name_id.access, and the file is stored in the $CUBRID/log/broker directory.

LOG_BACKUP

LOG_BACKUP is a parameter that specifies whether or not to back up access and error log files of the Broker. The default value is OFF. If this parameter is configured to ON, access and error logs are backed up when the CUBRID Broker terminates. The backup file name for access logs becomes broker_name_id access, and the one for error logs becomes broker_ name_id. error.

SQL_LOG_MAX_SIZE

SQL_LOG_MAX_SIZE is a parameter that specifies the maximum size of the SQL log file. The default value is 100,000 (KB). If the size of the SQL log file, which is created when the SQL_LOG parameter is configured to ON, reaches the value configured by the parameter, broker_name_id. sql.log.bak is created.

APPL_SERVER_PORT

APPL_SERVER_PORT, which can be added only in the Windows operating system, is a parameter that specifies the connection port for the application server (CAS) which communicates with the application client. The default is configured to add 1 to the specified BROKER_PORT parameter. As the maximum number of application servers is limited by the MAX_NUM_APPL_SERVER parameter of the cubrid_broker_conf file, the maximum number of connection ports for the application server (CAS) is also limited by the value of the MAX_NUM_APPL_SERVER parameter. If there is a firewall in the Windows operating system between application client and the CUBRID Broker, the connection port specified by BROKER_PORT and APPL_SERVER_PORT must be open.

APPL_SERVER

APPL_SERVER is a parameter that specifies the type of application servers created and managed by the CUBRID Broker. The default value is CAS.

MAX_STRING_LENGTH

MAX_STRING_LENGTH is a parameter that configures the maximum string length for bit, varbit, char, varchar, nchar, nchar varying data types. If this parameter is configured to -1, which is the default value, the length defined in the database is used. If the parameter is configured to 100, the value 100 is applied even when a certain attribute is defined as varchar(1000).

SOURCE_ENV

SOURCE_ENV is a parameter that specifies the file to independently configure operating system environment variables for each broker. The extension of the file must be env. All parameters specified in cubrid.conf can also be configured by environment variables. For example, the lock_timeout_in_secs parameter in cubrid.conf can also be configured by the CUBRID_LOCK_TIMEOUT_IN_SECS environment variable. As another example, to block execution of DDL statements on broker1, you can configure CUBRID_BLOCK_DDL_STATEMENT 1 in the file specified by SOURCE_ENV.

An environment variable, if exists, has priority over cubrid.conf.

The default value is cubrid.env.

STATEMENT_POOLING

STATEMENT_POOLING is a parameter that specifies whether or not to use statement pooling. The default value is ON.

When a transaction is committed or rolled back, CUBRID closes all the prepared statement handles that exist in the client session. However, if the parameter is set to STATEMENT_POOLING=ON, the prepared statement handles remain in the pool, so that the handles can be reused. Therefore, you must maintain the default setting (STATEMENT_POOLING=ON) in general applications that reuse prepared statements or in environments in which a library such as DBCP, in which the statement pooling is implemented, is applied.

When the parameter is set to STATEMENT_POOLING=OFF and the prepared statement is executed after the transaction is committed or terminated, the following message is displayed.

Caused by: cubrid.jdbc.driver.CUBRIDException: Attempt to access a closed Statement.

CCI_PCONNECT

CCI_PCONNECT is a parameter that specifies whether or not to use the CCI connection pooling. The default value is OFF. This parameter affects the applications using CCI API or interfaces such as PHP, ODBC, or OLE DB, which are developed in CCI API.

SELECT_AUTO_COMMIT

SELECT_AUTO_COMMIT is a parameter that sets auto-commit mode for SELECT statements in CCI or PHP. Its default value is OFF. However, note that auto-commit is performed only at the point at which the result set for all n query statements is fetched from the server when there are n prepared statements. An example is as follows. For more information, see cci_end_tran.

SELECT_1 prepare

SELECT_1 execute // AUTO COMMIT O

 

SELECT_1 prepare

SELECT_2 prepare

SELECT_1 execute // AUTO COMMIT X -> An EXPLICIT COMMIT needed

SELECT_2 execute // AUTO COMMIT O

 

SELECT_1 prepare

SELECT_1 execute // AUTO COMMIT O

INSERT_1 prepare

INSERT_1 execute // AUTO COMMIT X -> An EXPLICIT COMMIT needed

 

INSERT_1 prepare

INSERT_1 execute // AUTO COMMIT X -> An EXPLICIT COMMIT needed

SELECT_1 prepare

SELECT_1 execute // AUTO COMMIT X -> An EXPLICIT COMMIT needed

 

SELECT_1 prepare

INSERT_1 prepare

SELECT_1 execute // AUTO COMMIT X -> An EXPLICIT COMMIT needed

INSERT_1 execute // AUTO COMMIT X -> An EXPLICIT COMMIT needed

 

INSERT_1 prepare

SELECT_1 prepare

INSERT_1 execute // AUTO COMMIT X -> An EXPLICIT COMMIT needed

SELECT_1 execute // AUTO COMMIT X -> An EXPLICIT COMMIT needed

LONG_QUERY_TIME

LONG_QUERY_TIME is a parameter that specifies execution time which is evaluated as long-duration queries. The default value is 60000 in ms. Note that a parameter value is configured to 0, it is not evaluated as a long-duration query.

LONG_TRANSACTION_TIME

LONG_TRANSACTION_TIME is a parameter that specifies execution time which is evaluated as long-duration transactions. The default value is 60000 in ms. Note that a parameter is configured to 0, it is not evaluated as a long-duration transaction.

CCI_DEFAULT_AUTO_COMMIT

CCI_DEFAULT_AUTO_COMMIT is a parameter that specifies the automatic commit of applications developed by CCI API. The default value is OFF.

This parameter affects the applications developed by CCI API or the applications using interfaces (PHP, ODBC, and OLE DB) developed by CCI; it does not affect the applications developed by JDBC.

MAX_PREPARED_STMT_COUNT

MAX_PREPARED_STMT_COUNT is a parameter that limits the number of prepared statements by user (application) access. The default value is 2000 and the minimum value is 1. By making user specify the parameter value, creation of prepared statement exceeding memory allowed by system can be prohibited.

ACCESS_CONTROL

ACCESS_CONTROL is a parameter that limits the application that access a broker. The default value is OFF. For more information, see Broker Server Access Limitation.

ACCESS_CONTROL_FILE

ACCESS_CONTROL_FILE is a parameter that specifies database names, database user IDs, and file names including the list of IPs, which are allowed to access a broker. For more information, see Broker Server Access Limitation.