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

ACCESS_LIST is a parameter used to configure 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

ACCESS_LOG is a parameter used to configure whether to store the access log of the 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

ACCESS_MODE is a parameter used to configure default mode of the broker. The default value is RW. For details, see cubrid_broker.conf of "Administrator's Guide".

APPL_SERVER

APPL_SERVER is a parameter used to configure types of CAS generated and managed by the CUBRID broker. The default value is CAS.

APPL_SERVER_MAX_SIZE

APPL_SERVER_MAX_SIZE is a parameter used to configure the maximum size of the process memory usage handled by 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 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 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 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

APPL_SERVER_MAX_SIZE_HARD_LIMIT is a parameter used to configure the maximum size of process memory usage handled by CAS; the unit is MB and default value is 1024 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 severs 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 used 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 CASs 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 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.

Note For the CUBRID_TMP environment variable that specifies the UNIX domain socket file path of cub_master and cub_broker processes, see Configuring the Environment Variable.

APPL_SERVER_SHM_ID

APPL_SERVER_SHM_ID is a parameter used 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 used 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).  

BROKER_PORT

BROKER_PORT is a parameter used 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.

CCI_DEFAULT_AUTOCOMMIT

CCI_DEFAULT_AUTOCOMMIT is a parameter used to configure whether to make application implemented in CCI interface or CCI-based interface such as PHP, ODBC, OLE DB, Perl, Python, and Ruby commit automatically. The default value is ON. This parameter does not affect applications implemented in JDBC. In case of using ODBC, malfunction can occur if this parameter is ON; you must set it to OFF, in this case.

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.

Note The CCI_DEFAULT_AUTOCOMMIT parameter has been supported from 2008 R4.0, and the default value is OFF for the version. Therefore, if you use CUBRID 2008 R4.1 or later versions and want to keep the configuration OFF, you should manually change it to OFF to avoid auto-commit of unexpected transaction.

ERROR_LOG_DIR

ERROR_LOG_DIR is a parameter used 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.

KEEP_CONNECTION

KEEP_CONNECTION is a parameter used to configure the way of connection between 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

LOG_BACKUP is a parameter used to configure 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.hhmm when CUBRID stops.

LOG_DIR

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

LONG_QUERY_TIME

LONG_QUERY_TIME is a parameter used to configure 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

LONG_TRANSACTION_TIME is a parameter used to configure 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

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

In the 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.

MIN_NUM_APPL_SERVER

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

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.

MAX_QUERY_TIMEOUT

MAX_ QUERY_TIMEOUT is a parameter used 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.

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

MAX_STRING_LENGTH is a parameter used to configure 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).

PREFERRED_HOSTS

PREFERRED_HOSTS is a parameter that must be configured if the broker mode is set to PHRO. The default value is NULL. FOR details, see cubrid_broker.conf of "Administrator's Guide."

SERVICE

SERVICE is a parameter used 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.

SESSION_TIMEOUT

SESSION_TIMEOUT is a parameter used to configure timeout value for the session of the broker. 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. The default value is 300 (seconds).

SLOW_LOG

SLOW_LOG is a parameter used 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 used to configure the location of directory where the log file is generated. The default value is log/broker/sql_log.

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 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 to 1 in the file specified by SOURCE_ENV.

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

SQL_LOG

SQL_LOG is a parameter used 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 used to configure 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

STATEMENT_POOLING is a parameter used to configure 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

TIME_TO_KILL is a parameter used to configure the time to remove CAS in idle state among CAS 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, 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.