You can enable compression in Tomcat adding following lines to connector configuration in server.xml
compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml"
<Connector port="80" protocol="HTTP/1.1" compression="on" compressionMinSize="2048" connectionTimeout="20000" URIEncoding="UTF-8" redirectPort="8444" />
Some days ago i had have issue with my persistent level. The issue was with mysql connection timeout and hibernate c3p0 default connection setup.
Problem:
After 8 hours of inactivity of my application i have a broken pipe exception.
Root of problem:
MySQL automatically times out, and closes unused connections after 8 hours, and out of the box, Hibernate does not set up C3P0 to appropriately test/refresh its connection pool when connections go stale.
Solution: