Skip to content

A Valve for tomcat which can limit the amount of CPU time a request takes.

Notifications You must be signed in to change notification settings

buckett/tomcat-cpu-valve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Tomcat CPU Valve

A quick Tomcat Valve which allows a limit to be placed on the ammount of CPU time a request can take. If it takes longer than this limit the thread is stoped. This causes a ThreadDeath exception.

Installation

Drop the jar file into the lib folder at the toplevel of the Tomcat distribution.

Configuration

In your tomcat server configuration file (server.xml) add a Valve element:

<!-- Limit requests to 10 seconds -->
<Valve class="org.bumph.CPUValve" max="10000"/>

About

A Valve for tomcat which can limit the amount of CPU time a request takes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages