Skip to content

Instantly share code, notes, and snippets.

View djpentz's full-sized avatar

Darryl Pentz djpentz

  • Cape Town, South Africa
View GitHub Profile
@djpentz
djpentz / gist:e252d91109500d4ae42f
Created August 10, 2014 09:27
Configuring Tomcat for memcached persisted sessions on Ubuntu
1. Get the memcached session persistence JAR files.
wget http://repo1.maven.org/maven2/de/javakaffee/msm/memcached-session-manager/1.8.2/memcached-session-manager-1.8.2.jar
wget http://repo1.maven.org/maven2/de/javakaffee/msm/memcached-session-manager-tc7/1.8.2/memcached-session-manager-tc7-1.8.2.jar
wget http://repo1.maven.org/maven2/net/spy/spymemcached/2.11.1/spymemcached-2.11.1.jar
2. Copy those files into the Tomcat lib folder.
sudo cp memcached-session-manager-* /usr/share/tomcat7/lib
sudo cp spymemcached-* /usr/share/tomcat7/lib
@djpentz
djpentz / gist:1ff2c7b0f162e835c739
Created August 10, 2014 09:30
Increase Tomcat open file limit on Ubuntu
1. Edit /etc/init.d/tomcat7 (modify for whatever version you're running) and add the following two lines:
ulimit -Hn 65536
ulimit -Sn 65536
Feel free to choose whatever limit you prefer - I've simply indicated the option I chose.
@djpentz
djpentz / gist:2482b5bf4b9682a7bb455dce5f1f79f8
Last active May 23, 2022 17:42
Identifying hung transactions in MySQL