Uploading large files error to wildfly

懵懂的女人 提交于 2019-12-02 18:57:45
kirti

I have found solution for this. I had this same issue and I solved it. It may help others.

For allowing more http request header size you need to change standalone.xml file of jboss or wildfly.

Add max-header-size attribute to default server and restart the server it will work Standalone.conf

<subsystem xmlns="urn:jboss:domain:undertow:1.1">
        <buffer-cache name="default"/>
        <server name="default-server">
            <http-listener name="default" socket-binding="http" max-header-size="974247881"/>
            <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>
...
</subsystem>

It is not in "standalone.conf" file . It is "standalone.xml" file which is located in folder "standalone/configuration". change max-post-size :

<http-listener name="default" socket-binding="http" redirect-socket="https" max-post-size="104857600"/>
            <host name="default-host" alias="localhost">

see this link in jboss: https://issues.jboss.org/browse/UNDERTOW-185

max-post-size in ../wildfly/stanadalone/configuration/standalone.xml will be set.

If your wildfly stands behind webserver, e.q. nginx, you may have to set the limit there. This helped me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!