0

I just want to launch > play debug $ run with -Xss100k

I am chasing a stack overflow issue that is occurring on some machines running a Play application that appear to have a reduced stack size (i.e 32bit jvm). I want to debug the application whilst setting up the JVM with a small max stack depth using -Xss100k

I can reproduce the stack overflow in production mode using

start java -Xmx16G -Dconfig.file=application.conf -Xss100k -Dlogger.file=logger.xml %* -cp "./lib//*;" play.core.server.NettyServer .

But how can I run in debug mode with the same JVM restricted stack?

I have tried

play debug -Xss100k
play -Xss100k debug
play debug 
[server] run -Xss100k

None of these work

I have also tried using org.nanoko.playframework:play2-maven-plugin:1.2.2:debug within IntelliJ IDEA and have set the Maven config here Run/Debug Configuration

It runs with this cmd line

"C:\Program Files\Java\jdk1.7.0_51\bin\java" -Xss100k -Dmaven.home=C:\Tools\apache-maven-3.0.5 -Dclassworlds.conf=C:\Tools\apache-maven-3.0.5\bin\m2.conf -Didea.launcher.port=7536 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Tools\apache-maven-3.0.5\boot\plexus-classworlds-2.4.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher --update-snapshots --fail-fast --strict-checksums org.nanoko.playframework:play2-maven-plugin:1.2.2:debug

But it is not reducing the stack size

Yoztastic
  • 792
  • 1
  • 6
  • 20
  • 1
    wow I thought this would be a sinch to the Play guru's out there seems such a simple request. Only 11 views in 8 hours. Obviously Play not as popular as I was led to believe. Cant seem to post on the Play-framework mailing list either. – Yoztastic Nov 05 '14 at 20:22

1 Answers1

1

You can pass PLAY_OPTS environment variable

On linux:

export PLAY_OPTS="-Xss100k"
play debug

I see you are using Windows, so it should be:

set PLAY_OPTS=-Xss100k
play debug

Based on this answer https://stackoverflow.com/a/23518524/951609

Community
  • 1
  • 1
František Hartman
  • 12,810
  • 1
  • 36
  • 56