Decreasing Xss could save the total amount of off-heap memory that my JVM
uses, but it doesn't solve the problem - super dev mode's jvm hits the
"threads-per-process" limit of the os (
суббота, 22 июля 2017 г., 15:38:12 UTC-7 пользователь Jamesg написал:
>
> Looks like the number of threads being created is using up stack memory.
> Try reducing the amount of stack memory allocated to each thread on
> creation. -Xss depending on what JVM you are using try setting it to
> minimum.
>
>
> https://stackoverflow.com/questions/36898701/how-does-java-jvm-allocate-stack-for-each-thread
>
>
> On 22 Jul 2017 17:46, "Mikhail Krestyaninov" > wrote:
>
>> Hello.
>>
>> I have a very big GWT project which recently has become a bit more
>> bigger. After a new GWT module was added the following error started to
>> occur:
>>
>>
>> /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java
>>
>> -Dapple.awt.UIElement=true
>>
>> -Xmx2048m
>>
>> -Dorg.jboss.logging.provider=jdk
>>
>> -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog
>>
>> "-javaagent:/Applications/IntelliJ
>> IDEA.app/Contents/lib/idea_rt.jar=54880:/Applications/IntelliJ
>> IDEA.app/Contents/bin"
>>
>> -Dfile.encoding=UTF-8
>>
>> -classpath “VERY:BIG:CLASSPATH”
>>
>> com.google.gwt.dev.DevMode -superDevMode -style PRETTY -war /Users/
>> username/Library/Caches/IntelliJIdea2017.1/gwt/project.5b9c19f7/Project-
>> gwt.9c4fbf78/run/www -remoteUI 7906:IntelliJIdea com.example.gwt.
>> ProjectEntryPoint com.example.gwt.pages.Pages com.example.gwt.login.
>> LoginPage com.example.gwt.admin.AdminPage
>>
>>
>> Running CodeServer with parameters: [-noprecompile, -port, 9876, -
>> sourceLevel, 1.8, -bindAddress, 127.0.0.1, -launcherDir, /Users/username/
>> Library/Caches/IntelliJIdea2017.1/gwt/project.5b9c19f7/Project-gwt.
>> 9c4fbf78/run/www, -logLevel, INFO, -style, PRETTY, com.example.gwt.
>> ProjectEntryPoint, com.example.gwt.pages.Pages, com.example.gwt.login.
>> LoginPage, com.example.gwt.admin.AdminPage]
>>
>> Super Dev Mode starting up
>>
>> workDir: /var/folders/pd/1gzkcy4d4md1hcrwmjjbzqrcgn/T/gwt-
>> codeserver-7810232587123559115.tmp
>>
>> Jul 21, 2017 4:09:24 PM org.eclipse.jetty.util.log.JavaUtilLog info
>>
>> INFO: Logging initialized @3481ms
>>
>> Loading Java files in com.example.gwt.ProjectEntryPoint.
>>
>> Module setup completed in 49903 ms
>>
>> Loading Java files in com.example.gwt.pages.Pages.
>>
>> Module setup completed in 2964 ms
>>
>> Loading Java files in com.example.gwt.login.LoginPage.
>>
>> Module setup completed in 2350 ms
>>
>> java.lang.OutOfMemoryError: unable to create new native thread
>>
>>at java.lang.Thread.start0(Native Method)
>>
>>at java.lang.Thread.start(Thread.java:717)
>>
>>at java.util.concurrent.ThreadPoolExecutor.addWorker(
>> ThreadPoolExecutor.java:950)
>>
>>at java.util.concurrent.ThreadPoolExecutor.ensurePrestart(
>> ThreadPoolExecutor.java:1587)
>>
>>at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute
>> (ScheduledThreadPoolExecutor.java:334)
>>
>>at java.util.concurrent.ScheduledThreadPoolExecutor.
>> scheduleAtFixedRate(ScheduledThreadPoolExecutor.java:573)
>>
>>at java.util.concurrent.
>> Executors$DelegatedScheduledExecutorService.scheduleAtFixedRate(Executors
>> .java:735)
>>
>>at sun.nio.fs.PollingWatchService$PollingWatchKey.enable(
>> PollingWatchService.java:290)
>>
>>at sun.nio.fs.PollingWatchService.doPrivilegedRegister(
>> PollingWatchService.java:172)
>>
>>at sun.nio.fs.PollingWatchService.access$000(PollingWatchService.
>> java:45)
>>
>>at sun.nio.fs.PollingWatchService$2.run(PollingWatchService.java:
>> 128)
>>
>>at sun.nio.fs.PollingWatchService$2.run(PollingWatchService.java:
>> 125)
>>
>>at java.security.AccessController.doPrivileged(Native Method)
>>
>>at sun.nio.fs.PollingWatchService.register(PollingWatchService.
>> java:124)
>>
>>at sun.nio.fs.UnixPath.register(UnixPath.java:897)
>>
>>at sun.nio.fs.AbstractPath.register(AbstractPath.java:104)
>>
>>at com.google.gwt.dev.resource.impl.ResourceAccumulator.
>> onNewDirectory(ResourceAccumulator.java:163)
>>
>>at com.google.gwt.dev.resource.impl.ResourceAccumulator.
>> fullRefresh(ResourceAccumulator.java:91)
>>
>>at com.google.gwt.dev.resource.impl.ResourceAccumulator.
>> refreshResources(ResourceAccumulator.java:69)
>>
>>at com.google.gwt.dev.resource.impl.ResourceAccumulatorManager.
>> getResources(ResourceAccumulatorManager.java:113)
>>
>>at com.google.gwt.dev.resource.impl.DirectoryClassPathEntry.
>> findApplicableResources(DirectoryClassPathEntry.java:49)
>>
>>at com.google.gwt.dev.resource.impl.ResourceOracleImpl.
>> scanResources(ResourceOracleImpl.java:263)
>>
>>at com.google.gwt.dev.cfg.ModuleDef.getBuildResourceOracle(
>> ModuleDef.java:405)
>>
>>at com.google.gwt.dev.Compil