max-datasize
Syntax
max-datasize size;
Hierarchy Level
[edit event-options event-script], [edit system extension extension-service application], [edit system scripts commit], [edit system scripts op], [edit system scripts snmp], [edit system scripts translation]
Description
Maximum amount of memory allocated for the data segment during execution of a script of the configured type. The device sets the maximum memory limit for the executing script to the configured value irrespective of the total memory available on the system at the time of execution. If the executing script exceeds the specified maximum memory limit for that script type, it exits gracefully.
For op scripts, the max-datasize
statement is only enforced for op scripts that
are local to the device. If you execute an op script from a remote location using the
op url
command, the device uses the default memory allocation
settings.
For op scripts run with the max-datasize
statement
configured for the minimum, an error occurs. In Junos OS, the error
is "Memory allocation failed." In Junos OS Evolved, the error is "Out
of memory."
Default
If you do not include the max-datasize
statement, the default memory
allocated to the data segment portion of the executed script depends on the operating system
and release, which is as follows:
- Junos OS—Allocates half of the total available memory of the system up to a maximum value of 128 MB.
- Junos OS Evolved Release 21.4R1 and later—Allocates 1024 MB.
- Junos OS Evolved Release 21.3 and earlier—Allocates 128 MB.
Options
size |
Maximum amount of memory allocated for the data segment during execution of a script of the given type. If you do not specify a unit of measure, the default is bytes. The listed limits apply to the following types of scripts: commit, event, op, SNMP, translation, and extension service scripts.
|
Required Privilege Level
maintenance—To view or add this statement in the configuration.
Release Information
Statement introduced in Junos OS Release 12.3.
Support at the [edit system extension extension-service
application]
hierarchy level introduced in Junos OS Release
16.1 for MX80, MX104, MX240, MX480, MX960, MX2010, MX2020, and vMX.
Support at the [edit system scripts translation]
hierarchy
level introduced in Junos OS Release 16.1.