Je tente de construire un fichier .war dans le constructeur de service de prédiction h2o steam
en utilisant un fichier (~ 800MB) pojo
(un pojo similaire de taille ~ 200MB a également produit ces mêmes problèmes). Cependant, si vous essayez ceci, une erreur apparaît après avoir cliqué sur « build »:Ajout de plus de mémoire à h2o.ai Steam Prediction Service Builder
Problem accessing /makewar. Reason:
Compilation of pojo failed exit value 3 warning: [options] bootstrap class path not set in conjunction with -source 1.6
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:255)
at com.sun.tools.javac.util.BaseFileManager.makeByteBuffer(BaseFileManager.java:302)
at com.sun.tools.javac.file.RegularFileObject.getCharContent(RegularFileObject.java:114)
at com.sun.tools.javac.file.RegularFileObject.getCharContent(RegularFileObject.java:53)
at com.sun.tools.javac.main.JavaCompiler.readSource(JavaCompiler.java:602)
at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:665)
at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:950)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
at com.sun.tools.javac.main.Main.compile(Main.java:381)
at com.sun.tools.javac.main.Main.compile(Main.java:370)
at com.sun.tools.javac.main.Main.compile(Main.java:361)
at com.sun.tools.javac.Main.compile(Main.java:56)
at com.sun.tools.javac.Main.main(Main.java:42)
Je lance le générateur de service de prévision de la ligne de commande suivante l'instruction dans la documentation this. Y a-t-il un moyen de lancer le constructeur de service avec plus de mémoire?
MISE À JOUR Utilisation de la commande: $ GRADLE_OPTS=-Xmx4g ./gradlew jettyRunWar
Essayer de construire un .war du POJO renvoie l'erreur cli:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/reedv/.gradle/wrapper/dists/gradle-2.7-all/2glqtbnmvcq45bfjvhghri39p6/gradle-2.7/lib/gradle-core-2.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/reedv/Documents/h2o_production/h2o-steam/steam/prediction-service-builder/build/tmp/jettyRunWar/webapp/WEB-INF/lib/slf4j-simple-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
2017-09-21 15:22:48.084 -1000 [[email protected]] INFO MakeWarServlet - servletPath = /home/reedv/Documents/h2o_production/h2o-steam/steam/prediction-service-builder/build/tmp/jettyRunWar/webapp
2017-09-21 15:22:48.086 -1000 [[email protected]] INFO MakeWarServlet - tmpDir /tmp/makeWar316567921053262563022859149567148
2017-09-21 15:22:57.175 -1000 [[email protected]] INFO MakeWarServlet - added pojo model drf_denials_v4_v3-10-5-2.java
2017-09-21 15:22:57.190 -1000 [[email protected]] INFO MakeWarServlet - prejar null preclass null
2017-09-21 15:22:58.047 -1000 [[email protected]] INFO Util - warning: [options] bootstrap class path not set in conjunction with -source 1.6
2017-09-21 15:23:25.017 -1000 [[email protected]] INFO MakeWarServlet - tmpDir /tmp/makeWar432278342000106527922896081353600
2017-09-21 15:23:39.448 -1000 [[email protected]] INFO MakeWarServlet - added pojo model drf_denials_v4_v3-10-5-2.java
2017-09-21 15:23:39.569 -1000 [[email protected]] INFO MakeWarServlet - prejar null preclass null
2017-09-21 15:23:40.651 -1000 [[email protected]] INFO Util - warning: [options] bootstrap class path not set in conjunction with -source 1.6
2017-09-21 15:23:57.124 -1000 [[email protected]] INFO Util - OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006efd00000, 1592786944, 0) failed; error='Cannot allocate memory' (errno=12)
2017-09-21 15:23:57.604 -1000 [[email protected]] INFO Util - #
2017-09-21 15:23:57.605 -1000 [[email protected]] INFO Util - # There is insufficient memory for the Java Runtime Environment to continue.
2017-09-21 15:23:57.616 -1000 [[email protected]] INFO Util - # Native memory allocation (mmap) failed to map 1592786944 bytes for committing reserved memory.
2017-09-21 15:23:57.619 -1000 [[email protected]] INFO Util - # An error report file with more information is saved as:
2017-09-21 15:23:57.622 -1000 [[email protected]] INFO Util - # /tmp/makeWar432278342000106527922896081353600/hs_err_pid32313.log
2017-09-21 15:23:57.747 -1000 [[email protected]] ERROR MakeWarServlet - doPost failed
java.lang.Exception: Compilation of pojo failed exit value 1 warning: [options] bootstrap class path not set in conjunction with -source 1.6
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006efd00000, 1592786944, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 1592786944 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/makeWar432278342000106527922896081353600/hs_err_pid32313.log
at ai.h2o.servicebuilder.Util.runCmd(Util.java:162)
at ai.h2o.servicebuilder.MakeWarServlet.doPost(MakeWarServlet.java:151)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
2017-09-21 15:23:58.039 -1000 [[email protected]] ERROR MakeWarServlet - Compilation of pojo failed exit value 1 warning: [options] bootstrap class path not set in conjunction with -source 1.6
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006efd00000, 1592786944, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 1592786944 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/makeWar432278342000106527922896081353600/hs_err_pid32313.log
L'augmentation de la valeur d'allocation de mémoire à Xmx6g ou Xmx7g donne encore cette même erreur.
En outre, la recherche du fichier /tmp/makeWar432278342000106527922896081353600/hs_err_pid32313.log
qui a été soi-disant créé par cette erreur, il semble ne pas être un répertoire nommé « makeWar432278342000106527922896081353600 » dans mon tmp/répertoire racine, donc je ne suis pas vraiment sûr où chercher.
J'ai commencé le constructeur de service en suivant les instructions ici http://docs.h2o.ai/steam/latest-stable/prediction_service.html#build-and-run-the-builder-service, si c'est ce que vous voulez dire (jamais utilisé gradle avant). Où dois-je ajouter la commande 'GRADLE_OPTS = -Xmx4g'? Est-ce que tout est une seule ligne? (par exemple '$ GRADLE_OPTS = Xmx4g ./gradlew jettyRunWar')? – lampShadesDrifter
Oui tout dans une seule ligne – Magnus
Essayer ceci n'a pas produit d'erreurs dans le cli, mais en essayant de compiler le pojo dans un .war dans le constructeur de service, le navigateur (chrome) donne l'écran d'erreur "localhost n'a pas envoyer des données ERR_EMPTY_RESPONSE. " Rien d'autre ne semble se produire après cela. – lampShadesDrifter