"max number of thread"

We are running a java web app on a Ubuntu Oracle WebLogic server version 10.3.3.
The java web app performs long polls with open tcp socket to keep the client connection open. The clients are long polling the WebLogic at 30 seconds.
Currently we are not able to maintain stability for greater than 24 hours with approximately 200 simultaneous sessions on WebLogic server. Session to me is active client/server tcp connection. We have re-written our application to use continuations, but we are seeing ConcurrentModificationException errors in performance testing.
Is there any setting in WebLogic for “max number of thread” that can handle?
Edited by: user9316392 on Jul 8, 2010 11:07 AM

First, WebLogic since 9.0 has a self-tuning thread pool where WLS will automatically grow and shrink the number of threads based on some internal algorithms. I'm not aware of a hard limit so theoretically there is no max thread count as long as the JVM has memory and WLS thinks more threads will help. You can read up on it here:
http://www.oracle.com/technology/pub/articles/dev2arch/2006/01/workload-management.html
Practically, I wouldn't expect more than several hundred threads to be helpful.
As for your situation, how does WLS become unstable? Out of memory, out of file descriptors, errors on new requests, etc. I think you're going to have to use some JVM tools to see what happens to your JVM over time. Is there a memory leak somewhere, is it non-heap memory, etc. JRockit Mission Control is helpful if running on JRockit. If you're on Sun Hotspot, them presumably you can use some of the Hotspot tools. You'll want to compare the state of the JVM towards the beginning of your load test, but after a slight warm-up period with a snapshot after the load test has been running for a long period of time.

Similar Messages

  • Max number of Thread allowed

    I am writing a multi threading program.
    is there any limit on max number of thread allowed?
    if yes, how to check the limit?

    For the language: no. It depends on your memory (every Thread has its own stack, etc.).
    Kind regards,
      Levi

  • Max number of threads in Java?

    Hi,
    I am running into a bug now that I am testing my working code. Basically, my program creates a bunch of objects that talk to each other. Each object is a thread, and at a given time (there is a one object that keeps track of time) a thread may choose to message another thread. My problem is that when I create more objects, my code doesn't run to completion. For example, when I have 10 objects talking to each other, things work fine. But if I have 15, they all run for a little bit, then the program seems to just hang and not do anything.
    Is there a limit as to how many threads I can have? If I was out of memory or something, I'd get an exception, right? But I don't get anything - it just seems like things "freeze up".

    15 threads? shouldn't be a problem.
    I think th emax threads allows runs in thousands..if not ten of thousands.Java process threads itself use about 600 or more threads. howevr, it could also be the underlying system restr8iction on the number of threads allow per process????
    for you case: it's highly likely you run into the max # of threads.
    I can only think of two reasons for your application to freeze:
    1. Deadlock
    if you have an object that is synchronized..than you might have run into a deadlock (race-condition)
    for example:
    Object A has the key for Object X , and waiting for Object Z
    Object B has the key for Object Z, and waiting for Object X
    as you can see..they will never gives up the lock....so you're in a dead lock.
    2. Low memory resource. (Memory - Paging and Thrashing)
    Each of your thread is using up the resouces (memory) and processing power.
    When you reach the max or near max and needs to create more memory..the garbage collector kick in
    and try to reclaim some unused memory. This can slow down your application dramatically if the garbage
    collector is invoke often.
    Also..paging is performed when you reach max memory..the operating system keep on paging your memory (usually happens when there's a lot of threads and not enough memory. If this happen..than it
    can cause your program to becomes freeze like....remeber..each thread is given a small amount of time to
    perform a task..if the time it takes to load a page for a thread is almost equals to context switch time..than
    no work is really done..and your program "freeze"
    solution..redesign you app to prevent thrashing.
    it is likely paging is the culprit..but i would not dismiss deadlock issues.

  • Max number of threads in a jvm

    Is there any constraint for the maximum number of threads that we can
    create in a particular JVM

    Why do you have to worry about that? I don't see a reason to create lots and lots of threads. The OS will usually spend most of the time doing context switches if you create more than a couple of thousand threads.
    Kaj

  • Max Number of threads per Process in Solaris 8

    I'm running into qpplication which crashes with a segfault when the LWP for that process hits about 255, i'm trying to find the maximum number of threads per process using sysconf and its returning -1
    #include <unistd.h>
    int
    main(void)
    printf("%ld\n",sysconf(_SC_THREAD_THREADS_MAX));
    return 0;
    I'm using gcc 3.3.2
    If anyone can tell me the maximum number of threads per process I would really appreicate it.
    Also the maximum number of open files per process.
    Thanks in advance
    - Rodrick Brown
    - DoITT

    Please make sure that you build a
    multithreaded program first (check with ldd).
    If anyone can tell me the maximum number of threads per process I would
    really appreicate it.
    Also the maximum number of open files per process. It depends on the architecture (x86/SPARC), OS version,
    64 or 32-bit, /etc/system, shell limitations (/usr/bin/ulimit) ...
    Search for "rlim_fd_max / rlim_fd_cur" on docs.sun.com too.
    HTH,
    -vladimir

  • How to find out the number of threads created under java vm at runtime

    our application seems to have hit the max number of threads that can be created under vm and the vm will just hang after that. that behavior seems to be consistent from an article that I read earlier.
    I wonder any way that java app can find out the number of threads currently created under vm?
    thanks in advance!

    If you are not starting an extra thread group you can use the Thread.activeCount method. But this willnot return all the threads, as there are some jvm threads, i.e. garbage collector. Also if you are running on a Unix type operating system then you can send a signal to the jvm to give you a thread dump, i think the signal is sighup.
    If the application is hanging i would of thought that you have a deadlock situation rather then the JVM not being able to create new threads, roughly how many threads should be running ??

  • Max no of threads

    Is there such a thing as a max number of threads in a midp j2me application. My application, which makes extensive use of threads is suffering from hanging, where is shouldn't. How do I remedy this?
    Thanks.
    Pier.

    I am porting a agent programming api to the pda platform. Each agent has it's own communications, class loading and other threads. These threads have to be alive so that they are ready to execute any time this particular agent receives messages from another agent.
    So my problem does not have anything to do with the number of threads?
    Does it have anything to do with how j2me handles threads? My program runs with no problems at all on the wireless toolkit emulator. BUt on the iPAQ, sometimes it hangs near the beginning where several threads are being initiated. If it gets past that stage, there are no problems though.
    Any guesses to help me? :)
    Pier.

  • Tuning the good number of thread with Work Manager?

    Hi,
    I search some best practice or experience return on the max thread number on a weblogic managed server
    I try to explain: with WLS 8.1 and execute queue it was hard to tune the good number of thread but possible (with some processor and for an application we find that after 30 concurrent thread, there's lower performance because of switch on processeur, for others it was 45 for example)
    Now i can see sometimes more than 500 thread on one JVM and it seem to be very much for me!!
    we face some problem of response time in PRODUCTION, i can see sometimes more than 100 Stuck thread on a resource, so i think it's the reason of bad response time. But with Work Manager, it increase the number of thread to accept others request and the CPU stay at acceptable level (less than 50%) because the stuckthread are do nothing (waiting for resource)
    So i don't understand the good tuning to apply since WorkManager...ok it isn't normal to have a lot of stuck thread but if there's no matter about the max number of thread, is it useful to stop and restart managed server?
    do you think we can have have bad performance if there's a lot of thread?
    thank you for your experience return. If you have no idea just tell me how much thread you can see on your managed server in Production.

    up, up...
    we have always the same probleme in production: 50 stuck thread on each JVM since 15 days....
    the manages serveurs are in warning but don't seem to be disturb cause the work manager add more threads dynamicaly.
    Anyone have idea if this situation is a probleme for response time on other request ?
    reboot managed solve this situation but i would like to understand the consequence of this situation.
    thanks a lot for your experience.

  • Max number of chars in process message MSEL?

    Hi, what is the max number of characteristics can be used in process message category's MSEL table? Right now, I am using more than 99 characteristics and I get a short dump DYNPRO_FIELD_CONVERSION. Is it really limited to 99 characteristics and if it is true, is there an OSS note to change it to allow more than 99?
    Thanks and points available

    Please make sure that you build a
    multithreaded program first (check with ldd).
    If anyone can tell me the maximum number of threads per process I would
    really appreicate it.
    Also the maximum number of open files per process. It depends on the architecture (x86/SPARC), OS version,
    64 or 32-bit, /etc/system, shell limitations (/usr/bin/ulimit) ...
    Search for "rlim_fd_max / rlim_fd_cur" on docs.sun.com too.
    HTH,
    -vladimir

  • Get Max no of Threads allowed by OS

    Is there a way in java to programatically get the maximum number of threads that are allowed to be created by an operating system?
    Thru my readings on forums, I gather that though there is no such limit for green-type of java threads (I am not sure what green-type means), other regular threads are bound by the max thread limit allowed by the kernel. Is there a way to programmtically get this limit?
    If there is no such API to get this information in Java directly, is there some command that can be invoked using the Runtim.exec() methods depending upon the OS type?
    Thank you

    It depends probably on the OS, the mem size, the number and type of CPUs... in short: Java isn't really supposed to care.
    There is no way, and IMO there also isn't really a need to know.

  • In Oracle 10g, what is the max number of values we can pass to  'IN' Clause

    Hi,
    In my SQL query i have a scenario like, i have to pass the values to 'IN' Clause dynamically from other application. I want to know what is the the max number of values i can pass to 'IN' Clause.
    i have searched in many pages i seeing answers like 'may be 1000' , 'not sure'....
    Could any one tell me the exact limit of IN Clause in 10g.
    Thanks in Advance.
    Chandran

    Hi, Chandran,
    Chandran M wrote:
    In my SQL query i have a scenario like, i have to pass the values to 'IN' Clause dynamically from other application. I want to know what is the the max number of values i can pass to 'IN' Clause.
    i have searched in many pages i seeing answers like 'may be 1000' , 'not sure'....Don't overlook [Dont want to know|http://forums.oracle.com/forums/thread.jspa?messageID=2683385&#2683385]. This may explain why people are reluctant to give a straight answer.
    Could any one tell me the exact limit of IN Clause in 10g.1000 items such as IN (1, 2, 3, ..., 1000)
    No limit on the number of sets: IN ((1), (2), (3), ...) *<=== NOT QUITE!* See below
    No limit in sub-queries: IN (SELECT ...)
    Edited by: Frank Kulash on Jun 3, 2009 9:43 AM
    The limit of 1000 applies to sets of single items: (x) IN ((1), (2), (3), ...)
    There is no limit if the sets contain two or more items: (x, 0) IN ((1,0), (2,0), (3,0), ...)
    Thanks to Michaels for pointing this out.
    Edited by: Frank Kulash on Jun 3, 2009 10:22 AM
    Fixed link

  • Thread Pool with Min,Max. and other thread parameters

    hello,
    I found an Implementation of ThreadPool in the java.sun.com,but it didn't have the minimum,maximum no. of threads implemented in the code.
    Could you help me find out an implementation of Thread Pool,that keeps track of minimum no. of threads,max. no. of threads in the pool,the increment size of threads,number of idle threads,idle time allowable for a thread,etc...
    I also need to know if it is possible to have >5000 threads in a ThreadPool,beacuse I get OutofMemoryError,when I used a ThreadPool( which didn't have any of the above-mentioned parameters!)
    Thanks!!!

    Having greater then 5000 threads is a sign of a problem with your design. Threads are relativly costly
    beasties. The idea of using a pool for your threads is that you won't need to use 5000 threads
    simultaniously. Most OS's will have problems trying to create this many threads per process (unless you
    tune the OS itself (which is normally not too difficult))
    matfud

  • DPS6.2 Proxy Attribute:  number-of-threads

    What does the parameter number-of-threads mean in reference to DPS6.2 Proxy Server. It actually the value that we can set under Proxy Server -> Server Configuration -> Performance -> Non-Secure Service -> Connections.
    From Command line we can run: ./dpconf get-ldap-listener-prop -h host -p port
    to see the parameter number-of-threads.
    By Default the value is set to 2. We had lots of issues on the proxy servers. The requests never reached the server. We saw nothing in the logs. But when we hiked this value to 64 which is max as per the console, the issues were resolved.
    Any thoughts around the same would be highly appreciated.

    One "listener" thread accepts new connections and hand them over to a "connection handler" thread which is responsible for polling/reading traffic. Once an operation is read, it is passed over to a 'worker thread' that processes the request.
    The parameter you mention controls how many "connection handler' threads are associated with the 'listener' thread. By default, it is set to 2. Each client connection is associated (using round robin algo) with 1 connection handler thread.
    -Sylvain

  • HT204053 Max number of devices on one iTunes account?

    Max number of Devices on a single iTunes account

    Devices or Computers? The former there is no limit. For the latter there is a limit of 5.

  • High number of threads and high CPU usage on a single instance

    Without any apparent reason, in some moments of day the website reports an increment of the HTTP Queue Length from an average of 10/20 queued requests to 100/200 and more.
    In that period of time the Average Response Time increases but the number of the requests on the website don't. Even increasing the instances it doesn't help to resolve the problem (maybe it just reduced it).
    It seems that the problem is not related to the traffic on the site. This issue happens either when the traffic is high or low.
    The autoscaling works well, we don't have peak of traffic but always a slow increasing of requests and the CPU is always below the 50% (memory too). The issue is resolved by the swap of the site and sometimes it's resolve by itself after a while.
    What I discovered when the issue happens, is that there's an instance (just an instance only), that has an high number of threads and CPU usage on the W3WP.exe process and these values are above the mean than the other instances. Eg, instances are around
    50/60 threads and 10/20% of CPU, the instance with the problem has 200 threads and 50/60% of CPU. If I kill the W3WP process on that instance the issue is resolved. 
    I monitored the HTTP requests, I tried the website extension "Diagnostics as service" but I can't discover anything that can help me to understand the problem. Of course, there are many requests that go in timeout but it is a consequences of a
    unresponsive instance.
    On the web hosting plan there are only two sites: the production site and its staging which is used for update of the production only and it's always sleeping. Plus, no webjobs are running on this site.
    What can I do to gather useful information that can help me to understand the reason of this problem?
    Thank you!

    "Does the instance with the high counts receive more traffic than the other instances? Is it possible that the load balancer not
    working the way it should be?"
    How can I get that information? I can't see metrics for a specific instance
    "Does it always happen to the first instance?"
    I will check it better, but in the order given by the Processes panel it's the second instance which has the issue. The scaling is at 2 instances for the most part of the time (it's the minimum).
    Maybe one time it was the 3th instance but I'm not sure, I'll give it more attention.
    " How long do these moment last?"
    The time can be 10 to 30 minutes, but I fix it as soon as I see the problem. It's not the down-scaling to resolve it because in these situations the CPU as well is high so the scaling holds or increases the number of instances.
    "- How often do these moments occurs?"
    It occurs quite often, 2/4 times a week.

Maybe you are looking for