Skip to content

Instantly share code, notes, and snippets.

@colegatron
Created September 30, 2016 07:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colegatron/d46f55e942710d452d4be599191167cd to your computer and use it in GitHub Desktop.
Save colegatron/d46f55e942710d452d4be599191167cd to your computer and use it in GitHub Desktop.
Java too much open files; restart and notify
*/5 * * * * [ $( lsof -p $(pgrep java) | wc -l ) -gt 60000 ] && service tomcat7 restart && notify-adm "${HOSTNAME}: [ERROR] JVM open files limit reached, restarting."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment