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].

ACCESS_LIST

A parameter used to specify the name of a file where the list of IP addresses of an application which allows access to the CUBRID 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_LOG

A parameter used to specify whether to store the access log of Broker. 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 under $CUBRID/log/broker directory.

ACCESS_MODE

A parameter used to specify default mode of Broker. The default value is RW. For details, see cubrid_broker.conf of "Administrator's Guide".

APPL_SERVER

A parameter used to specify types of application servers generated and managed by the CUBRID Broker. The default value is CAS.

APPL_SERVER_MAX_SIZE

A parameter used to specify the maximum size of the process memory usage handled by application servers (CAS); the unit is MB.

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 application servers (CAS).

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

For 32-bit Windows, the default value is 40 MB; for 64-bit Windows, it is 80 MB. At the time when current process size exceeds the value of APPL_SERVER_MAX_SIZE, broker restarts the corresponding application server. For Linux, the default value is 0; an application server restarts in the following conditions.

  • The value is zero or negative : At the point when current process size becomes twice as large as initial memory
  • The value 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 severs 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

A parameter used to specify the maximum size of process memory usage handled by application servers (CAS); the unit is MB and defaul value is 1024 MB.

Specifying this parameter makes transactions being processed forcibly terminate (rollback) and restart application servers (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 severs may restart frequently and unexpectedly.
When restarting application servers (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

A parameters used to specify the connection port of application server (CAS) that communicates with an application; it is only supported for Windows. The default value is determined by adding plus 1 to the BROKER_PORT parameter value. The maximum number of application servers is specified in the MAX_NUM_APPL_SERVER parameter in cubrid_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 firewall exists between an application and the CUBRID Broker, the communication port specified in BROKER_PORT and APPL_SERVER_PORT must be open.

APPL_SERVER_SHM_ID

A parameter used to specify the ID of shared memory used by application servers (CAS); the value must be unique within system. The default value is the same as the port value of Broker.

BROKER_PORT

A parameter used to specify the port number of the Broker; the value must be unique and smaller thatn 65,535. The default port value of query_editor' Broker is 30,000 and the port value of broker1 is 33,000.

CCI_DEFAULT_AUTOCOMMIT

A parameter used to specify whether to use automatic commit of applications developed by CCI APIs. The default value is ON. This parameter affects applications developed by CCI APIs or an applications using interfaces (PHP, ODBC, and OLE DB) developed by CCI; it does not affect the applications developed by JDBC.

CCI_PCONNECT

A parameter used to specify whether or not to use the CCI connection pooling. The default value is OFF. This parameter affects applications developed by CCI APIs or an applications using interfaces (PHP, ODBC, and OLE DB) developed by CCI; it does not affect the applications developed by JDBC.

ERROR_LOG_DIR

A parameter used to specify a default directory in which error logs about Broker is stored. The default value is log/broker/error_log. The log file name for Broker error is broker_ name_id.err.

KEEP_CONNECTION

A parameter used to specify the way of connection between application servers (CAS) and application clients; it is set to one of the followings: ON, OFF or AUTO. If this value is OFF, clients are connected to servers in transaction unit; for 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.

LOG_BACKUP

A parameter used to specify whether to back up access and error log files of the Broker when CUBRID stops. The default value is set to OFF. An access log file (broker_name access) in the $CUBRID/log/broker directory is deleted when CUBRID stops. If the value is set to ON, an access log file is stored (backed up) as broker_name access yyyymmdd.hhmi when CUBRID stops.

LOG_DIR

A parameter used to specify 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

A parameter used to specify 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.

LONG_QUERY_TIME

A parameter used to specify execution time of query which is evaluated as long-duration query. The default value is 60 (seconds) and can be value in msec. with a decimal separator. For example, the value should be configured into 0.5 to configure 500 msec. Note that a parameter value is configured to 0, it is not evaluated as a long-duration query.

LONG_TRANSACTION_TIME

A parameter used to specify execution time of query which is evaluated as long-duration transaction. The default value is 60 (seconds) and can be value in msec. with a decimal separator. For example, the value should be configured into 0.5 to configure 500 msec. Note that a parameter is configured to 0, it is not evaluated as a long-duration transaction.

MAX_NUM_APPL_SERVER

A parameter used to specify the maximum number of simultaneous connections allowed. The default value is 40.

In an environment where connection pool is maintained by using middleware such as DBCP or WAS, the value of MAX_NUM_APPL_SERVER parameter and the number of connection pools should be same.

MAX_PREPARED_STMT_COUNT

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.

MAX_QUERY_TIMEOUT

A parameter used to specify 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.

The default value is 0 (seconds) and it means infinite wait. The value range is available from 8 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 and cci_set_query_timeout functions to configure query timeout of CCI applications. For configuring query timeout of JDBC applications, see the setQueryTimeout method.

MAX_STRING_LENGTH

A parameter used to specify the maximum string length for bit, varbit, char, varchar, nchar, nchar varying 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).

MIN_NUM_APPL_SERVER

A parameter used to specify the minimum number of application servers (CAS) even if any request to connect the Broker has not been made. The default value is 5.

PREFERRED_HOSTS

A parameter mandatorily configured if Broker mode is set to PHRO. The default value is NULL. FOR details, see cubrid_broker.conf of "Administrator's Guide."

MAX_NUM_APPL_SERVER

A parameter used to specify the maximum number of application servers (CAS). The default value is 40. In environment in which connection pool is maintained by using a middle ware such as WAS, you must specify the value of MAX_NUM_APPL_SERVER parameter as same as that of connection pool.

SELECT_AUTO_COMMIT

A parameter used to specify auto-commit mode for SELECT statements in CCI or PHP. The default value is OFF. 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 details, see "API Reference > CCI API > 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

SERVICE

A parameter used to specify whether to run 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.

SESSION_TIMEOUT

A parameter used to specify timeout value for the session of Broker. 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 is terminated.

SLOW_LOG

A parameter used to specify 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

A parameter used to specify the location of directory where the log file is generated. The default value is log/broker/sql_log.

SOURCE_ENV

A parameter used to specify 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

A parameter used to specify whether to use statement pooling. The default value is ON.

When 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 value is configured 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.

SQL_LOG

A parameter used to specify 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
SQL_LOG_MAX_SIZE

A parameter used to specify 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.

STATEMENT_POOLING

A parameter used to specify whether to use statement pool feature. The default value is ON.

CUBRID 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, are 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.

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

TIME_TO_KILL

A parameter used to specify the time to remove application servers (CAS) in idle state among application servers added dynamically. 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, the application server (CAS) is 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.