Welcome to the DjaoDjin Blog!

A place to share experiences in building Software-as-a-Service.

Redmine is very slow

by Sebastien Mirolo on Mon, 14 Nov 2011

I setup redmine recently run through thin behind a nginx on a rackspace cloud machine. The interface is great and it seems like a very useful application if it was not so slow to respond. Simple http requests take forever even on a machine that experiences only minor traffic.

Apparently, I am not the only one with slowness issues (see here and here). Reading through the posts I guessed my current issue is not so much with redmine itself but with ruby web servers in general.

I thus decided to run a single thin server instance and use a port connection instead of a socket (See thin usage) just to validate the theory.

# We have to stop thin before doing any modifs to redmine.yml
$ thin stop --all /etc/thin
$ diff -u prev /etc/thin/redmine.yml
-servers: 4
-socket: /tmp/thin.sock
+servers: 1
+port: 5000

$ diff -u prev /etc/nginx/sites-available/redmine.conf
 upstream thin_cluster {
-    server unix:/tmp/thin.0.sock;
-    server unix:/tmp/thin.1.sock;
-    server unix:/tmp/thin.2.sock;
-    server unix:/tmp/thin.3.sock;
+    server;

# Taking the opportunity to install thin in /etc/init.d
$ thin install
$ /usr/sbin/update-rc.d -f thin defaults
$ /etc/init.d/thin start
$ /etc/init.d/nginx restart

Redmine is a lot more responsive now. A little more to gain would be great but I think that might require to tinker with the ruby interpreter and/or the postgres connection at this point.