Is there any parameter for HTTP/HTTPS connectors which is equivalent to the maximum packet size for AJP connector in JBoss?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 5.x
- 6.x
Issue
- I can configure the max packet size (
packetSize) for the AJP connector. But how can I do this for the HTTP connector?
Resolution
packetSizeis only an AJP specific parameter. Since HTTP is not a packet-oriented protocol like AJP, you don't need to worry about packet size and there's no exactly equivalent parameter in HTTP/HTTPS connectors. However, the closest parameter for HTTP/HTTPS connectors would be the max header size, which defaults to8192.
EAP 6.x
- You can configure the max header size for HTTP/HTTPS connectors by setting the system property
org.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE. For example:
<system-properties>
<property name="org.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE" value="8192"/>
</system-properties>
- On EAP 6 Domain Mode, you can set it to each individual host:
[domain@192.168.100.1:9999 /] /host=laptopHost/system-property=org.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE:add(value=8192)
{
"outcome" => "success",
"result" => undefined,
"server-groups" => undefined
}
[domain@192.168.100.1:9999 /] /host=laptopHost/system-property=org.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE:read-resource
{
"outcome" => "success",
"result" => {
"boot-time" => true,
"value" => 8192
}
}
Or set it to each server-group:
[domain@192.168.100.1:9999 /] /server-group=production-group/system-property=org.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE:add(value=8192)
{
"outcome" => "success",
"result" => undefined,
"server-groups" => undefined
}
[domain@192.168.100.1:9999 /] /server-group=production-group/system-property=org.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE:read-resource
{
"outcome" => "success",
"result" => {
"boot-time" => true,
"value" => 8192
}
}
- For further references, please also refer to the community documentation: Content from docs.jboss.org is not included.JBoss Web System Properties.
EAP 5.x and earlier
- You can configure the max header size by setting the
maxHttpHeaderSizeattribute on the HTTP/HTTPS connectors in$JBOSS_HOME/server/$PROFILE/deploy/jbossweb.sar/server.xml. For example:
<Connector protocol="org.apache.coyote.http11.Http11Protocol" port="8080" address="${jboss.bind.address}"
connectionTimeout="600000" maxHttpHeaderSize="8192" redirectPort="8443" />
SBR
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.