https://github.com/hermanbanken/play-newrelic
Play dummy that uses New Relic: causes OutOfMemory exceptions
https://github.com/hermanbanken/play-newrelic
Last synced: 8 months ago
JSON representation
Play dummy that uses New Relic: causes OutOfMemory exceptions
- Host: GitHub
- URL: https://github.com/hermanbanken/play-newrelic
- Owner: hermanbanken
- License: other
- Created: 2015-03-02T20:37:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-14T10:09:59.000Z (over 10 years ago)
- Last Synced: 2024-12-27T18:42:02.678Z (10 months ago)
- Language: Scala
- Size: 5.93 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Demonstration of Play - New Relic problem
=========================================To run this app with New Relic agent use the `-J-javaagent` flag, so:
````
activator "~run" -J-javaagent:/root/play-newrelic/lib/newrelic.jar
````Then go to [http://localhost:9000/](http://localhost:9000/). Compare results with and without New Relic.
### Limit memory
To limit the amount of memory used and thus the size of the dump file, we use the Xmx flag. First we need to compile, as activator does not respect the memory limits.
````
activator dist
cd target/universal
unzip play-newrelic-1.0-SNAPSHOT.zip
cd play-newrelic-1.0-SNAPSHOT
cp ../../../lib/newrelic.yml lib
./bin/play-newrelic -J-XX:+HeapDumpOnOutOfMemoryError -J-Xmx64m -J-Xms64m -J-javaagent:/root/play-newrelic/target/universal/play-newrelic-1.0-SNAPSHOT/lib/newrelic.jar
`````-XX:+HeapDumpOnOutOfMemoryError` makes sure the Heap file will be created automatically.
Credits:
Original zip streaming recipe from [http://blog.greweb.fr/?p=1993](http://blog.greweb.fr/?p=1993)