Published on Apr 2 2012 in Java Tomcat

See updated article here.

NOTE: In Cyclos installation requirements you can read: "make sure you have at least 250Mb memory available for Cyclos". So when trying to deploy it on 64MB Tomcat you will get java.lang.OutOfMemoryError: Java heap space in logs/catalina.out. Please use Tomcat Plus package with custom heap memory addon or Cyclos package.

With 128MB of heap memory you can see in logs/catalina.out:

08:58:09,360  INFO DataBaseConfiguration - Database is empty. Running setup to populate it
Creating database structure... Database structure created
Creating basic data... Basic data created
Creating initial data... Initial data created
Setup executed

It may take even a few minutes to deploy but with 128MB heap you will still get java.lang.OutOfMemoryError: GC overhead limit exceeded.

The Cyclos standalone package specifies Xmx256M in its startup script. We managed to fire it up with 192MB but it is hard to say how usable it will be with this low assingnment. Ocassionally we get java.lang.OutOfMemoryError: PermGen space with 192MB. You can enable JMX (also via JVMCP panel) and connect with jconsole to estimate memory requirements and usage of your Tomcat/Cyclos instance. Our test showed 200MB of heap memory (it fluctuates between 160 and 210), 132MB of non-heap memory, 124MB of PS Perm Gen memory used and over 16000 classes loaded, right after first login into Cyclos and idle application. Just for your information, Idle Tomcat with deafult applications uses: 10-20MB of heap memory, 30MB of non-heap memory, 27MB of PS Perm Gen memory and 3000 classes.

For bigger installations we recommend using Xen-512 or higher from our offer. We do the initial MySQL/Tomcat/JDK/Cyclos setup free of charge on request.

Installation with Tomcat package

  1. Login to JCP and set make sure Tomcat is version 6.x and JDK is version 1.6.x
  2. Login to cPanel and create database, database user and assign privileges for example:
database: username_cyclos
database user: username_cyclos
database user password: changeMe
privileges: all
  1. Download, extract, move to webapps
$ cd
$ wget http://downloads.sourceforge.net/project/cyclos/Cyclos3/3.6_RC1/cyclos_3.6_RC1.zip
$ unzip cyclos_3.6_RC1.zip
$ mv cyclos_3.6_RC1/web ~/appservers/apache-tomcat-6.0.33/webapps/
$ cd ~/appservers/apache-tomcat-6.0.33/webapps
$ mv web cyclos
  1. Modify basic settings in $CATALINA_HOME/webapps/cyclos/WEB-INF/classes/cyclos.properties to match your domain, user, password:
cyclos.host.url=http://localhost:8080/cyclos/ ---> cyclos.host.url=http://cyclos.jvmhost.net/cyclos/ 
hibernate.connection.url = jdbc:mysql://localhost/cyclos3 ---> hibernate.connection.url = jdbc:mysql://localhost/username_cyclos
hibernate.connection.username = cyclos ---> hibernate.connection.username = username_cyclos
hibernate.connection.password = cyclos1234 ---> hibernate.connection.password = changeMe

Optionally you can set cyclos application to be accessible at root URL of your domain. See How can I have my Java application accessible at domain's root URL. Do not forget to update cyclos.host.url if this is the case.

  1. Restart tomcat and check logs (you can also do it via JCP). It can take a few minutes to deploy.
$ jr
$ tail -f ~/appservers/apache-tomcat-6.0.33/logs/catalina.out
  1. Access cyclos at your domain e.g. http://cyclos.jvmhost.net/cyclos with user 'admin' and password '1234'

Cyclos usability greatly improves with SMS module that allows for payments via mobile phone. We can install SMS module for you if needed. Contact support for quote.