[cyclos 3.7.3] Waiting Server Response

Bug and problem reporting

Moderators: hugo, alexandre, rmvanarkel

Post Reply
exo
Posts: 15
Joined: Tue Feb 19, 2013 9:03 am
Location: Heraklion

[cyclos 3.7.3] Waiting Server Response

Post by exo »

Hi everyone,

I have installed the cyclos platform in my centos server succesfully. Everything seems perfect until the server did not respond to my commands(page loading without is receiving response from the server) and the browser displays a message : "waiting for 192.168.1.10:8080/cyclos"
In order to work cyclos again I have to restart tomcat service from terminal but after few hours the server does not respond again and I need to restart the tomcat service again etc. etc.
I think that the problem caused from tomcat heap memory but I am not sure for that.

Please tell me what I can do in order to find a solution about this problem.

My Server specifications are found below :

[root@cyclos ~]# service tomcat start
Starting tomcat7:
Using CATALINA_BASE:
Using CATALINA_HOME:
Using CATALINA_TMPDIR:
Using JAVA_HOME: /usr/java/jdk1.7.0_13
Using JAVA_OPTS: -Xms128m -Xmx256m -XX:MaxPermSize=128m
Using CATALINA_BASE: /usr/tomcat/apache-tomcat-7.0.35
Using CATALINA_HOME: /usr/tomcat/apache-tomcat-7.0.35
Using CATALINA_TMPDIR: /usr/tomcat/apache-tomcat-7.0.35/temp
Using JRE_HOME: /usr/java/jdk1.7.0_13
Using CLASSPATH: /usr/tomcat/apache-tomcat-7.0.35/bin/bootstrap.jar:/usr/tomcat/apache-tomcat-7.0.35/bin/tomcat-juli.jar
done.
[root@cyclos ~]# java -version
java version "1.7.0_13"
Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

CentOS
==========
Release 6.4(Final)
Core Linux 2.6.32-358.2.1.el6.x86_64
GNOME 2.28.2

Hardware
==========
Memory : 3,7GB
CPU : Intel(R) Xeon(R) CPU X3430 @2.40GHz

Disk Space
==========
150GB
simonjwoolf
Posts: 113
Joined: Mon May 28, 2012 8:49 am

Re: [cyclos 3.7.3] Waiting Server Response

Post by simonjwoolf »

Hi,

Your problem is here:

Code: Select all

Using JAVA_OPTS: -Xms128m -Xmx256m -XX:MaxPermSize=128m
Cyclos likes to have almost 500Mb of RAM for itself when it is initialised (when Tomcat is started or restarted).

You should create the file CATALINA_HOME/bin/setenv.sh and add this line in that file:

Code: Select all

JAVA_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=128M"
Then restart tomcat and you should find a significant improvement in performance.

More info:

http://www.cyclos.org/wiki/index.php/In ... 2F_Java.29
---
Simon Woolf
Cyclos Consultant
exo
Posts: 15
Joined: Tue Feb 19, 2013 9:03 am
Location: Heraklion

Re: [cyclos 3.7.3] Waiting Server Response

Post by exo »

I create the file

Code: Select all

-rwxr-xr-x 1 tomcat tomcat     51 Apr 16 16:19 setenv.sh
and I add this

Code: Select all

JAVA_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=128M"


Now I have to delete these lines in startup.sh file and then restart the tomcat service ???? (I added these lines in order to increase my heap size)

Code: Select all

#Increase Heapsize
# ----- Execute The Requested Command ---------------------------------------
JAVA_OPTS="-Xms128m -Xmx256m -XX:MaxPermSize=128m"
echo "Using CATALINA_BASE: $CATALINA_BASE"
echo "Using CATALINA_HOME: $CATALINA_HOME"
echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
echo "Using JAVA_HOME: $JAVA_HOME"
echo "Using JAVA_OPTS: $JAVA_OPTS"
simonjwoolf
Posts: 113
Joined: Mon May 28, 2012 8:49 am

Re: [cyclos 3.7.3] Waiting Server Response

Post by simonjwoolf »

The startup file method is perfectly fine - you can do it that way too. Sorry to confuse you! Using a setenv file is the Tomcat7 "approved" way, I believe - its a bit less fragile than having the options in a startup script (you might for example start Tomcat from a different script, and then these options wouldn't be applied).

Either way, your problem (I think) is that you haven't increased the heap size enough. Ensure that -xmx is 512 - or even more, if you have plenty of RAM. Also note that if you want to run multiple instances of Cyclos on one server, you'll need to further increase this to approx 512 x number of instances.
---
Simon Woolf
Cyclos Consultant
exo
Posts: 15
Joined: Tue Feb 19, 2013 9:03 am
Location: Heraklion

Re: [cyclos 3.7.3] Waiting Server Response

Post by exo »

Hi simonjwoolf,

I have 2 questions :
  1. Firstly, I want to ask you if I use setenv.sh file in order to increase heapsize I have to enable this file with some kind of code in startup.sh file ?
  • Secondly, I want you to tell me how much RAM memory I should have for my server and what is the best value for -xmx in order to increase heapsize in case I have 500 registered members on my cyclos site?
Thank you for your kind attention.
simonjwoolf
Posts: 113
Joined: Mon May 28, 2012 8:49 am

Re: [cyclos 3.7.3] Waiting Server Response

Post by simonjwoolf »

All you need to do with setenv.sh is to create it in the correct location (CATALINA_HOME/bin), and then restart tomcat. Tomcat7 always looks for this file, and parses the options in it, if it exists.

If you are running one instance of Cyclos then setting -xmx to 512Mb will be about right. It makes no difference how many members you have - that will increase the size of your mySQL database on disk, but does not affect the amount of RAM needed to startup and run Cyclos.
---
Simon Woolf
Cyclos Consultant
exo
Posts: 15
Joined: Tue Feb 19, 2013 9:03 am
Location: Heraklion

Re: [cyclos 3.7.3] Waiting Server Response

Post by exo »

Thank you very much for all your help and useful information.

Have a nice day! :D
Post Reply