Enabling the max_http_payload_size property
The -Dcom.ibm.csi.netcool.integrations.max_http_payload_size
property
of the HTTP Transport module allows you to limit the amount of data
embedded in the body of an HTTP POST
request. The
data in the HTTP POST
must be an XML message. If
a valid XML message is too large, its transformation speed is relatively
slow. In a worst case scenario, very large messages may stall at some
point before getting to the transformation part.
Although the
probe can still run and process other HTTP POST
requests,
the mounting stalled points will eventually crash the probe due to
memory depletion. To prevent a denial of service attack, the max_http_payload_size
property
allows you to bar large XML messages from entering the pipeline.
max_http_payload_size
property
is specified in bytes.UNIX and Linux operating system
If you are running the probe on UNIX or Linux operating systems, customize the probe scripts using the following steps:
- Update nco_p_message_bus.env by adding the
following line at the end of the file:
NCO_PROBE_JAVA_ARGS=-Dcom.ibm.csi.netcool.integrations.max_http_payload_size=xxxx
- Update nco_jprobe by updating the following
command:
exec "$JAVA" $NCO_PROBE_JAVA_ARGS $NCO_JPROBE_JAVA_FLAGS -cp "$CLASSPATH" -DOMNIHOME="$OMNIHOME" -DKERN_ARCH="$KERN_ARCH" com.ibm.tivoli.netcool.omnibus.oidk.Probe "$@"
Windows operating system
If you are running the probe on Windows operating systems, update nco_p_message_bus.bat using the following steps:
- Add the following line before the line discussed in Step 2:
set TRANSPORT_EXTRA_ARGS=-Dcom.ibm.csi.netcool.integrations.max_http_payload_size=xxxx
- Add the
TRANSPORT_EXTRA_ARGS
variable to the following line:%JAVA_EXEC_USED% -DOMNIHOME=%NEWOMNIHOME% ^ -cp %PROBE_CLASSPATH%;%CP_CLASSPATH%;%FW_CLASSPATH%;%PS_CLASSPATH%;%NS_CLASSPATH%;%TS_CLASSPATH%;%MESSAGEBUS_CLASSPATH%;%TRANSPORT_EXTRA_ARGS% ^ com.ibm.tivoli.netcool.omnibus.oidk.Probe %*
Selecting a value for the max_http_payload_size property
The payload size specified must be between 5120 and 2097152.
If you set max_http_payload_size
to
a value outside of this range (for example, 12300000),
when the probe starts it uses the maximum allowable payload value
instead and writes the following exception to the error log:
Error:
D-JPR-000-000: [HttpParser]: Property [com.ibm.csi.netcool.integrations.max_http_payload_size]'s
value: 12300000 is out of range.Valid range is from 5120 to 2097152;
Max valid value will be used as the http payload size limit.
If
the probe receives an XML message that exceeds the value set for max_http_payload_size
,
the probe writes the following exception to the error log:
Error
message for xml message's size exceeding max_http_payload_size: Information:
I-JPR-104-000: [stderr] com.ibm.tivoli.netcool.integrations.transportmodule.http.HttpException:
HttpParse: Abort reading payload, number of byte exceeds the limit
(2097152): %d