Showing posts with label Jboss Application server. Show all posts
Showing posts with label Jboss Application server. Show all posts

Monday, March 25, 2013

Application is throwing HTTP Errors/connection timed out errors?

Below are the conditions for throwing Connection timed timed out or HTTP errors.

Sol 1: This problem can be raised because of there is no connection timed out specified in LOAD BALANCER or Application server.

Do the below configurations in you configurations:

--> In Jboss  "server.xml" file specify timed out entry
                        <connectionTimedout="600000" ....> [10 min]


---> In worker.property file specify the connection poll timed out entry
                              worker.node1.connection_pool_timedout=600  [10 min]


Still you are facing the connection timed out error do the below configuration

Sol 2:
 In Jboss application server not mentioned the minSpare or maxSpare connection / minSpare or maxSpare values are not accurate but in web server these values are described ,see below

For Jboss , in server.xml file <connection Timedout="600000" maxThreads="500">
For Web server, in httpd.conf file minSpare 50
                                                   maxSpare 250

due to above configuration, connections are established at web server but the application server is not accepting the connection sent by the web server ,  so you are able to see "HTTP errors"


Do the below configurations in you configurations:

For Jboss , server.xml file
<connection Timedout="600000" maxThreads="500" minSpare="50" maxSpare="250"> 

Here for minSpare and maxSpare , web server contained 50 for minSpare and 250 for maxSpare, same values we need to define in server.xml file or bit high is recommended  But after changing these values run the script and see the results and connection timed out errors, if still facing increase or decrease by 5 (50-5,250-5) and perform the test , check the results. Do the same (increasing / decreasing ) till you get the optimal value.

Sol 3:If still facing the connection timed out error , specify the acceptCount in server.xml file

<connection Timedout="600000" maxThreads="500" minSpare="50" maxSpare="250" acceptCount="100"> 

Accept Count: Number of requests in queue

                

Sunday, March 24, 2013

Why Application server (Jboss) utilization is very High?


Verify the number of "Max Threads" in server.xml file(deploy/Jboss-web-deployer/server.xml). If this value is not accurate then , it creates more threads, then CPU utilization increases.
Rule of thumb for "Max Threads" = 250*no. of processors
= 250 *2 (2 core system)
= 500
Now change the value in your server.xml , shown below

Monday, May 7, 2012

How to configure Heap size in Jboss app server

For running JAVA applications in Jboss application server , need to specify the min and max memory for that Application server this sizing is called Heap size.

run.conf  contains min and Max heap size. This file is located in bin folder of JBOSS i.e.   JBOSS_HOME/bin

Thursday, May 3, 2012

JVM Heap Sizes max Limit for Windows and Linux/Unix.

For running JAVA code, We need JVM. Typically We can set the JVM sizes in Application servers. This JVM size is also called Heap Size.

JVM heap size Configuration file:

     File_Name          Location            Server_Name    OS_Name    64/32 Bit Processor     Heap Sise_Max
    -------------------------------------------------------------------------------------------------------
     run.conf         JBOSS_HOME/bin          JBOSS      Windows                32                           1.4G to 1.6G
     run.conf         JBOSS_HOME/bin          JBOSS      Windows                64                              3G


       run.conf         JBOSS_HOME/bin          JBOSS      Sun Solaris             32                              2G
      run.conf         JBOSS_HOME/bin          JBOSS      Sun Solaris             64                              4G



       run.conf         JBOSS_HOME/bin          JBOSS     Unix/Linux               32                              2G
      run.conf         JBOSS_HOME/bin          JBOSS     Unix/Linux               64                              4G

------------------------------------------------------------------------------------------------------------------------------
catalena.sh    TOMCAT_HOME/bin    TOMCAT      Windows                32                           1.4G to 1.6G
catalena.sh    TOMCAT_HOME/bin    TOMCAT      Windows                64                              3G


catalena.sh    TOMCAT_HOME/bin    TOMCAT     Sun Solaris             32                              2G
catalena.sh    TOMCAT_HOME/bin    TOMCAT     Sun Solaris             64                              4G



catalena.sh    TOMCAT_HOME/bin    TOMCAT      Unix/Linux             32                              2G
catalena.sh    TOMCAT_HOME/bin    TOMCAT      Unix/Linux             64                              4G
-----------------------------------------------------------------------------------------------------
server.xml     See below note1                   Web Sphere              Windows                   32                           1.4G to 1.6G

server.xml     See below note1                 Web Spher            Windows             64                             3G
server.xml    See below note1                   Web Sphere      Sun Solaris            32                              2G
server.xml    See below note1                   Web Sphere      Sun Solaris            64                              4G
server.xml See below note1                   Web Sphere    Unix/Linux    32               2GB                        
server.xml See below note1                   Web Sphere    Unix/Linux    64               4G

Note:
For Web Sphere Location is in Command Prompt:
<TWS_home>/appserver/profiles/twsprofile/config/cells/
DefaultNode/nodes/DefaultNode/servers/server1/server.xml
For Web Sphere Location is in UI : Application servers > server1 > Java and Process Management > Process Definition >Java Virtual Machine





Wednesday, February 22, 2012

Jprofiler Configuring for Jboss application server and Jboss portal server

Jprofiler Configuration for Jboss Application server
For profiling your application you required two Jprofiler softwares
1. Is for Agent (Agent sit in Application server for collecting the profiling counters which may be any Linux/Unix machines)
2. Is for Monitoring collecting data (which is having GUI and sits on any Windows machine)
Note: It is possible to monitor your application from one Jprofiler but we require
a. GUI for that Linux machine (Now day mostly all Unix/Linux are in CLI interface, so we just installing agent in Unix/Linux machines and monitoring from windows machine)
b. It is not recommended because Jprofiler uses Java flat form and your Application server require Java flat form then it is difficult to profile the application)
Agent Configuration:
Step 1: Open the following URL http://www.ej-technologies.com/download/jprofiler/files.html and download the suitable Jprofiler and Place this in your Unix/Linux machine (assume you placed this in /opt)
Or
Open the following URL http://www.ej-technologies.com/download/jprofiler/files.html and right click on suitable Jprofiler and select the “Copy link address”. Then open the server using putty (cd /opt) and enter the following command wget –c http://download.ej-technologies.com/jprofiler/jprofiler_linux_7_1.tar.gz (paste the copied link here)
Note: Use following commands in your putty session for finding suitable version
Cat /proc/*release
Step 2: If your file extension is tar.gz the do the following commands for extraction
gunzip filename
tar filename
Step 3: In Linux machine open .bash_profile file (usually located in /root directory)
Enter jprofiller location (using export command) in .bash_profile file
export JPROFILER_HOME =/opt/jprofiler6/bin/linux-x86
Step 4: Open run.conf from Jboss_Home/bin then add the below content in the run.conf file
JAVA_OPTS="$JAVA_OPTS -agentpath:/opt/jprofiler6/bin/linux-x86/libjprofilerti.so=port=8849 -Xbootclasspath/a:/opt/jprofiler6/bin/agent.jar"
Monitoring the Profiling Data from Windows machine :
Step 1: Install the Jprofiler in windows machine (agent version and this version should be same)
Step 2: From ‘Quick Start‘ Screen select “An application on a remote computer” option and click on next button
Step 3: From the Wizard select “On remote computer” and select which OS your app server /agent is running and click on next
Step 4: From JVM Vendor , version . Select which vendor JVM using , version and click on next
Step 5: Select “wait for a connection From the Jprofiler GUI”
Step 6: Start your jboss now from your putty
Preconditions:
1. JRE required
2. Jboss server need to Stop before configuring the agent
3. License key required in Windows environment (Agent does not required license key)