Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting JIRA to run on amazon ec2 t1.micro instance

I am trying to get JIRA to run on an amazon ec2 t1.micro instance but it won't start. If I try to run the same AMI on an m1.small machine, it will work fine.

I have done some research and this is because JIRA maxes out the CPU on startup. This causes amazon to throttle the CPU of the instance right down. Jira then takes too long to load the core plugins and gives up/stops.

I have tried increasing the timeout to 300 seconds as per this blog, but it still doesn't work.

I'm trying to run this on: Ubuntu 12.04 x86_64 AMI provided by amazon.

This is for an extremely small project with 3 developers and we don't mind if it's slow or anything like that, we just want it to work. Any suggestions?

like image 499
NullPointer Avatar asked Aug 03 '12 02:08

NullPointer


1 Answers

Adding JVM_SUPPORT_RECOMMENDED_ARGS="-Datlassian.plugins.enable.wait=300" to jira/bin/setenv.sh did not fix my problem with Jira 6 on a EC2 micro instance.

I could see in the log that it was going further, but it was crashing for no apparent reason. Turns out the micro instance doesn't have enough memory.

My solution: There was no swap on the EC2 AMI that I used, so I had to create one:

sudo dd if=/dev/zero of=/var/swapfile bs=1M count=2048 &&
sudo chmod 600 /var/swapfile &&
sudo mkswap /var/swapfile &&
echo /var/swapfile none swap defaults 0 0 | sudo tee -a /etc/fstab &&
sudo swapon -a

Now Jira is able to load and initialize all plugins, it's a bit slow but seems like disabling the GZip compression helps.

like image 194
Marc A. Avatar answered Oct 26 '22 15:10

Marc A.