In order to fine tune an HTTP listener, the Payara Server administration console provides the means to configure a wide range of options. Besides the basic configuration available for a HTTP listener in the HTTP service section, it is also possible to set low-level configuration details in the HTTP tab of the same network listener in the Network-Config section.
There may be cases, however, where the necessary configuration option is not available in the admin console. For these cases, there are more configuration options available under the hood, which are not exposed in the GUI admin console, nor by any higher-level asadmin command.
If you come to a rare situation where no exposed option allows configuration of an HTTP listener to resolve a problem, it might be useful to know how to configure additional options of the underlying Grizzly component so that these options can be set using the asadmin set command and a dotted name.
The networking subsystem of Payara Server is based on Grizzly, which is a non-blocking server framework to build robust, highly-performant and scalable servers. Payara Server conveniently exposes all server configuration properties of the Grizzly component that are listed on the Grizzly documentation page. All the properties can be set in the configuration of a Payara Server network protocol using the asadmin set command. It is only necessary to convert a property name in camel case into a dash-separated name.
Example
For example, if your configuration is named server-config and the network listener is http-listener-1, execute the following asadmin command to set a value of maxResponseHeaders Grizzly property to 1000:
asadmin> set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.max-response-headers=1000
The above command increases the threshold for the number of headers in HTTP responses.
Similar commands can be used to set any Grizzly network listener properties. Just replace max-response-headers with the name of the option to set, using the dash character as a word separator instead of using the camel case notation.
Add Comment
Comments
Please sign in to leave a comment.