I'm having some serious problems regarding my Play! Applications performance. I already tried to change the server and the data base, but the slowness persists.
Using Firebug to measure my http requests I found out that they are taking around 20 seconds just to start replying.
So my last hope is to use VisualVM to profile my application and find its bottle necks. But I don't know the proper way of passing some arguments like "-Dcom.sun.management.jmxremote" without messing with the global JAVA_OPTS variable.
Thanks again!
It looks like Metrics handles this automatically.
Add the following to your Build.scala app dependencies:
"com.yammer.metrics" % "metrics-core" % "2.1.2"
And start instrumenting your code. Then start up the application with "play run" -- VisualVM should show your JVM process and you can just connect to it directly (assuming you have the VisualVM-MBeans plugin). Check to see if you have at least 1.3.4. This is what I see when I start up:
the xsbt.boot.Boot process is Play.
More generally, this article really helps when debugging Akka based frameworks like Play.
In case someone needs to profile a Play 2.3.x app:
Put your JAVA_OPTS settings in ~/.activator/activatorconfig.txt (c.f. https://typesafe.com/activator/docs):
-Dcom.sun.management.jmxremote.port=1234 -Dcom.sun.management.jmxremote.rmi.port=1234 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=127.0.0.1
In VisualVM, add a Local JMX connection to localhost:1234
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With