| OpenResty documentation | view source | Contained in the OpenResty distribution. |
OpenResty::Limits - Various contraints used in the OpenResty server
use OpenResty::Limits;
print join("\n",
$MODEL_LIMIT,
$VIEW_LIMIT,
$FEED_LIMIT,
$ROLE_LIMIT,
$COLUMN_LIMIT,
$RECORD_LIMIT,
$INSERT_LIMIT,
$POST_LEN_LIMIT,
$MAX_SELECT_LIMIT,
$PASSWORD_MIN_LEN,
$VIEW_MAX_LEN,
$ACTION_MAX_LEN,
$ACTION_CMD_COUNT_LIMIT,
$ACTION_REC_DEPTH_LIMIT,
);
This module defines various constants which limits the resources each OpenResty account could use, like the number of different objects (models, rows, views, and etc.).
These constants are not truly constants. Some of them could be overridden by some config options specified in etc/site_openresty.conf. So different servers may have (very) different limitations.
$MODEL_LIMITModel count limit in an account, default 40.
Controlled by config file option frontend.model_limit.
$VIEW_LIMITView count limit in an account, default 100.
$FEED_LIMITFeed count limit in an account, default 100.
$ROLE_LIMITRole count limit in an account, default 100.
$COLUMN_LIMITColumn count limit in a model, default 40.
Controlled by config file option frontend.column_limit.
$RECORD_LIMITRow count limit in a model, default 200.
Controlled by config file option frontend.row_limit.
$INSERT_LIMITMaximal number of rows inserted in a single POST request, default 20.
Controlled by config file option frontend.bulk_insert_limit.
$POST_LEN_LIMITContent length limit for a POST/PUT request, default 1_000_000 (1 MB).
Controlled by config file option frontend.post_len_limit.
$MAX_SELECT_LIMITMaximal number of rows returned by a unlimited query, default 200.
$PASSWORD_MIN_LENMinimum length for the password of a role, default 6 chars.
$VIEW_MAX_LENThe maximal length of a view definition, default 5_000 (5 KB).
$ACTION_MAX_LENThe maximal length of an action definition, default 5_000 (5 KB).
$ACTION_CMD_COUNT_LIMITMaximal number of commands in a single action's definition, default 5
$ACTION_REC_DEPTH_LIMITThe maximal depth of recursive action calls, default 3.
Agent Zhang (agentzh) <agentzh@yahoo.cn>
OpenResty::Config, OpenResty, OpenResty::Spec::Overview.
| OpenResty documentation | view source | Contained in the OpenResty distribution. |