Some Wildfly 10 Configurations
1. Web Filter Initialization
By Default In Wildfly web filters (Servlet Filters) are lazily loaded i.e. when there will be the very first request.
So to initialize the web filters on server startup need to add eager-filter-initialization="true"
Configuration snippet
<subsystem xmlns="urn:jboss:domain:undertow:3.1">
<servlet-container name="default" eager-filter-initialization="true">
<jsp-config/>
<websockets/>
</servlet-container>
</subsystem>
2. Increase transaction timeout
By Default the transaction timeout is 300 to increase the same
Add <coordinator-environment default-timeout="3600"/>
<subsystem xmlns="urn:jboss:domain:transactions:3.0">
<core-environment>
<process-id>
<uuid/>
</process-id>
</core-environment>
<recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
<coordinator-environment default-timeout="3600"/>
</subsystem>
3. Increase Post size and Parameter size
Sometimes a need arises to increase the HTTP post data size and also to increase HTTP parameters below is the snippet to set it in the HTTP tag.
<server name="default-server">
<http-listener name="default" socket-binding="http" max-post-size="100000000" max-parameters="5000" redirect-socket="https" enable-http2="true"/>
<https-listener name="https" socket-binding="https" max-post-size="100000000" max-parameters="5000" security-realm="ApplicationRealm" enable-http2="true"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>
</server>
By Default In Wildfly web filters (Servlet Filters) are lazily loaded i.e. when there will be the very first request.
So to initialize the web filters on server startup need to add eager-filter-initialization="true"
Configuration snippet
<subsystem xmlns="urn:jboss:domain:undertow:3.1">
<servlet-container name="default" eager-filter-initialization="true">
<jsp-config/>
<websockets/>
</servlet-container>
</subsystem>
2. Increase transaction timeout
By Default the transaction timeout is 300 to increase the same
Add <coordinator-environment default-timeout="3600"/>
<subsystem xmlns="urn:jboss:domain:transactions:3.0">
<core-environment>
<process-id>
<uuid/>
</process-id>
</core-environment>
<recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
<coordinator-environment default-timeout="3600"/>
</subsystem>
3. Increase Post size and Parameter size
Sometimes a need arises to increase the HTTP post data size and also to increase HTTP parameters below is the snippet to set it in the HTTP tag.
<server name="default-server">
<http-listener name="default" socket-binding="http" max-post-size="100000000" max-parameters="5000" redirect-socket="https" enable-http2="true"/>
<https-listener name="https" socket-binding="https" max-post-size="100000000" max-parameters="5000" security-realm="ApplicationRealm" enable-http2="true"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>
</server>
Comments
Post a Comment