All threads are currently busy solution

Source: Internet
Author: User
Tags dba jboss jboss server apache tomcat log4j

January 22, 2011 Advanced Performance Tester Skills

1. Development Knowledge:

N at least a good command of an object-oriented programming language (such as C #), familiar with 2 or more languages (specifically what languages need to be familiar with, you can make decisions based on the project situation).

N at least two scripting languages, mastering VBScript under the Windows platform (easy to learn, practical for testing), mastering Perl under the Linux platform.

2. Database knowledge:

N at least a good command of database-related performance tuning and management, to intermediate DBA level (the recommended Oracle database), to understand MySQL or SQL Server database.

3. operating system:

N at least proficient in the Linux operating system performance tuning and management, to achieve intermediate system management level (recommended Redhat Linux operating system). Learn about other Unix operating systems

N Network Knowledge:

N familiar with the TCP/IP protocol,

4. Testing Knowledge:

N at least two performance test tools, one is Windows platform, the other is Linux platform: LoadRunner, Http_load and so on.

n familiar with the relevant test theory knowledge.

5. Software Engineering:

n Master UML, design pattern, development mode, etc. at least

6. Industry Knowledge:

N Understand the industry knowledge of the project

Description of the relevant knowledge will continue to add ...

Posted @ 2011-01-22 19:32 Small confused fairy reading (14) | Comments (0) | Edit

January 16, 2010 elearning Performance Test Summary Report elearning Performance Test Summary report I       Project situation  

Project name

Elearning

Tuning process

To locate an application that has no thread-safe code

DBA navigates to SQL without binding variables and adds indexes to the database

Increase the number of JBoss AJP connector threads

Adjusting JVM Parameters

Adjust DBCP Connection Pool parameters

Increase log4j log threshold to reduce IO

Problem accumulation

Server hardware is adequate, but Web server layer error frequency is high when performance is satisfied

Final conclusion

The cost of adding HTTP headers, locating non thread-safe, and DBCP connection parameters is the most expensive. This performance testing and tuning involves a number of levels, positioning performance bottlenecks rely on the common knowledge accumulation, as long as the split module properly, positioning bottlenecks have patterns to follow. To troubleshoot whether a bottleneck is needed for DBA assistance in the database.

In addition, Google is a first-rate helper when confronted with problems.

Resource consumption

Lasted 2 weeks

ii. problems and solutions in implementation Category I issues (resolved):

Number

Problem description

Solving method

1

The manual execution function succeeded, but the Vugen execution script server response returned 0 bytes

Use the sniffer ethereal to discover the differences between hand-executed and Vugen execution scripts, adding Web_add_auto_header ("Modeltype", "model");

Solve the problem, after consulting Neusoft development Engineer, server-side resolution input code has

if ("Model". Equals (Webrequest.getheader ("Modeltype"))
Judge

2

Contoller insufficient records for Param X into table to provide the vuser with unique data

Delete Root disk directory local settings/temp file, exclude interference

3

A server random error was detected while executing concurrently, confirming that there is no thread-safe code

In the client, the server side respectively uses the sniffer (fiddler, Ethereal, tcpdump) confirms the contract, the receipt package the condition, confirms that the contract is correct, the server HttpRequest receives the package also to be correct. So the program appears in the internal variable does not do thread synchronization

4

apache  error_log:  [ERROR] server reached maxclients setting, consid Er raising the maxclients setting

 

In httpd.conf add:

startservers ten

mins Pareservers

Maxspareservers

Serverlimit 3000

MaxClients 2000 

Maxrequestsperchild 10000

KeepAliveTimeout

 

and restart httpd service

 

5

java.lang.OutOfMemoryError:PermGen space,

Java.lang.OutOfMemoryErro R:unable to create new native

 

 

Adjust JVM, add heap, stack control, and other parameters. Final

Run.conf:

 

java_opts=-xms1536m-xmx1536m -xx:permsize=512m-xx:maxpermsize=512m -xss256k -dsun.rmi.dgc.client.gcinterval=3600000-dsun.rmi.dgc.server.gcinterval=3600000- Dcom.sun.management.jmxremote.port=9999-dcom.sun.management.jmxremote.authenticate=false- Dcom.sun.management.jmxremote.ssl=false

 

 

6

JBoss Server.log has all threads are currently busy, waiting. Increase MaxThreads or check the servlet status  

Apache forward http via mod_jk1.2 Request to JBoss.

So modify Jboss-4.0.5.ga/server/default/deploy/server.xml

Adjust AJP connector settings:

 

<!--A AJP 1.3 Connector on port 8009-->

      <connector port= "8009" address= jboss.bind.address} "backlog=" 1200

         maxthreads= "2100" minsparethreads= "maxsparethreads="

         Emptysessionpath= "true" enablelookups= "false" redirectport= "8443"

          protocol= "ajp/1.3"/>

 

Add file handles .bash_profile :  in linux  ulimit  -n  4096

 

 

7

ora-00020:maximum Number of processes (+) exceeded

& nbsp;  using Oracle Statspack and checking for wait event, no database blocking was found. Therefore, the location to the connection pool parameter improper configuration caused the exception.

Change the Apache DBCP connection pool parameters to prevent connection leak.

<set property= "removeabandoned" value= "true"/>

                                  <set property= "Removeabandonedtimeout" value= "a"/>

                                  <set property= "logabandoned" value= "true"/ >

 

8

Adjust log4j log level

In Jboss-4.0.5.ga/server/default/conf/log4j.xml

Increase log output threshold:

<param value= "ERROR"/>

 

Class II issues (unresolved):

Number

Problem description

Avoidance scheme

1

Category III Issues (Legacy):

Number

Problem description

Legacy reasons

1

Server hardware is adequate for performance scenarios, but the Web server layer applies a large number of code errors

has satisfied performance. It is recommended to use tools such as TPTP, Jprofiler or JRockit Mission control to locate hotspot methods.

third, technology development

Refer to the information used in the tuning:

1 Apache Tomcat Configuration Reference http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html

2 outofmemoryexceptionwhenredeploying http://wiki.jboss.org/wiki/Wiki.jsp?page=OutOfMemoryExceptionWhenRedeploying

3 Preventing DB Connection pool leaks

Http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html

4 Apache Performance Tuning

Http://httpd.apache.org/docs/2.0/misc/perf-tuning.html

5 Tuning Garbage Collection with the 5.0 Java[tm] Virtual Machine

Http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html

Posted @ 2010-01-16 15:36 Small confused fairy reading (1116) | Comments (0) | Edit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.