Wildfly server memory error

Asked

Viewed 84 times

-1

I tried to import a 66 megas file, and gave this error in wildfly : Caused by: java.lang.Outofmemoryerror: Java heap space

In addition to including this setting in spring.

@Bean public Multipartresolver multipartResolver() { Commonsmultipartresolver multipartResolver = new Commonsmultipartresolver(); multipartResolver.setMaxUploadSizePerFile(524288000); multipartResolver.setMaxUploadSize(524288070); multipartResolver.setDefaultEncoding("UTF-8"); Return multipartResolver; }

I modified the file size on the server, according to image: inserir a descrição da imagem aqui

Understand that the server has little memory.

I went to the archive standalone.conf, of the server and modified:

JAVA_OPTS="-Xms64m -Xmx512m -XX:Maxpermsize=256m -Djava.net.preferIPv4Stack=true" JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"

for:

JAVA_OPTS="-Xms1024m -Xmx2056m -XX:Maxpermsize=2056m -Djava.net.preferIPv4Stack=true" JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"

Still I still have the same mistake ?

What can it be ?

Server image.

inserir a descrição da imagem aqui

  • Check the top menu on Runtime, and then on the side menu on the left JVM add Heap information here too (Used and Committed)

  • Thanks @Pauloh.Hartmann, I added to the question what you asked for.

  • This strange, sure you use the settings of standalone server? (it may be that your server is picking up the settings from standalone-full for example) If I’m not mistaken the memory described in the Committed Heap field should be what is described in the -Xms configuration of the . conf file

  • More or less. Where is this file ? How do I change ?

  • How are you starting the Wildfly server? Are you starting it through an IDE, like netbeans? or are you going in the shell and going up there?

  • I’m starting with the eclipse.

Show 1 more comment

1 answer

-1

Try configuring in Eclipse, because this standalone.conf file is only loaded when wildfly is executed by shell via standalone.sh or if it is in windows standalone.bat

  • Consider putting this information in the comment.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.