Professional Web Applications Themes

unable to create new native thread - Coldfusion Server Administration

W2k3 no sp, CFMX 7 hotfix 3, JRun 4, updater 5, multi - instance getting the following error (not opened a case yet)(paths removed to protect the environment): "Error","jrpp-446","07/15/05","10:54:24","CAPS","unable to create new native thread The specific sequence of files included or processed is: search_form.cfm " Saw several instances of this in a Google search, including a resolution for CFMX 6. I start my JVMs a little something like this: java.args=-server -Xmx1024m -Xms384m -Dsun.io.useCanonCaches=false -Xbootclasspath/a:"{application.home}/servers/cfusion3/cfusion-ear/cfusion-war/W EB-INF/cfusion/lib/webchartsJava2D.jar" -XX:MaxPermSize=384m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -DJINTEGRA_NATIVE_MODE -DJINTEGRA_PREFETCH_ENUMS -XX:NewSize=64m -XX:PermSize=32m Server has 4GB of physical memory....

  1. #1

    Default unable to create new native thread

    W2k3 no sp, CFMX 7 hotfix 3, JRun 4, updater 5, multi - instance getting the
    following error (not opened a case yet)(paths removed to protect the
    environment):

    "Error","jrpp-446","07/15/05","10:54:24","CAPS","unable to create new native
    thread The specific sequence of files included or processed is: search_form.cfm
    "

    Saw several instances of this in a Google search, including a resolution for
    CFMX 6. I start my JVMs a little something like this:

    java.args=-server -Xmx1024m -Xms384m -Dsun.io.useCanonCaches=false
    -Xbootclasspath/a:"{application.home}/servers/cfusion3/cfusion-ear/cfusion-war/W
    EB-INF/cfusion/lib/webchartsJava2D.jar" -XX:MaxPermSize=384m
    -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -DJINTEGRA_NATIVE_MODE
    -DJINTEGRA_PREFETCH_ENUMS -XX:NewSize=64m -XX:PermSize=32m

    Server has 4GB of physical memory.


    ke4pym Guest

  2. #2

    Default Re: unable to create new native thread

    *bump*
    Anyone? Bueller?
    ke4pym Guest

  3. #3

    Default Re: unable to create new native thread

    i'm running into this errror too. mine says:

    500 unable to create new native thread

    I'm assuming there must be a patch for this out there?? I read about the one
    regarding MX6.1 however I am running MX7. I will continue to look for the patch
    for version 7 for this issue, but if someone can quick link me to it, that
    would be great.

    ladybug Guest

  4. #4

    Default Re: unable to create new native thread

    OK! i have found the proper page with the updates... in case someone is looking
    for it, its located at

    [url]http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_17883[/url]

    I believe the hotfix dated 7/31/05 will fix this problem.

    ladybug Guest

  5. #5

    Default Re: unable to create new native thread

    Hi ladybug.

    None of the patches will address the unable to create new native thread error.
    We're still getting them on CF updater 3. However, we turned on verbose
    reporting for the garbage collector (gc) and discovered that a memory pool area
    was filling up and not getting cleaned out. Macromedia recommended that we
    stop forcing the memory values (-XX:NewSize=64m and -XX:PermSize=32m). I have
    decided to try -XX:+AggressiveHeap instead and force the heap to 1GB of memory.
    To try to solve my problem. I saw some recommendations that NewSize should be
    60 to 70% the size of your heap. But that's a lot of memory. AggressiveHeap
    will look at the number of processors and system memory and tune the values for
    you for performance. You need the 1.4.1 at a minimum (idealy 1.4.2_08 which is
    current) to use AggressiveHeap.

    You can turn on verbose GC with
    -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC
    don't run this more than you need. It takes system resources away from your
    server to do.

    It will dump into <servername>-out.log in the JRun logs (or the equivlent in
    CF Standard - we use Enterprise in J2EE mode). Hope this helps.

    ke4pym Guest

  6. #6

    Default Re: unable to create new native thread

    thank you for the reply! this is what i currently have in my JVM arguments
    settings...

    -server -Dsun.io.useCanonCaches=false -XX:MaxPermSize=128m
    -Dcoldfusion.rootDir={application.home}/../
    -Dcoldfusion.libPath={application.home}/../lib

    are you saying that i should remove the line for the MaxPermSize or should i
    just modify it to a larger value? also, the setting for aggressive heap... does
    that go in as
    -XX:+AggressiveHeap=1GB

    I haven't played around with the JVM variables in the administrator until
    today so plz forgive my newbie status in this area.

    thanks so much for your help


    ladybug Guest

  7. #7

    Default Re: unable to create new native thread

    Use -Xmx1024m -Xms1024m (this will force your JVM to use 1GB of memory. No
    more, no less. You need to be careful here. Make the wrong choice and crash
    your JVM.

    -XX:+AggressiveHeap simply turns it on. You do not need any other options.
    Make sure you have 1.4.2_08 installed and are telling CF to use it.


    ke4pym Guest

  8. #8

    Default Re: unable to create new native thread

    excuse me for the newbie questions but how do I turn on that reporting feature
    mentioned above and where would I check/change these settings for CFM to use
    more memory? I am also getting these errors on a regular basis.

    Thank you alll.

    Magnus_The_Great Guest

  9. #9

    Default Re: unable to create new native thread

    I wish I could say that this fix worked however it proved to be disastrous.
    When I made the change in the CFM Admin as instructed to 1024 it brought the
    server down for 1 hour as I had to locate the jave.config file to hard code it
    back to 512 default. I am still seeing the "unable to create new native
    thread" error and was wondering if there is a different direction I should be
    taking on this.

    Thank you for your help

    Magnus_The_Great Guest

  10. #10

    Default Re: unable to create new native thread

    Magnus, would you please provide more details about your environment? Version
    and type of CF install?

    You turn on verbose logging with the switch:
    -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC

    I wouldn't go tinkering with the other settings until you see why you're
    getting the unable to create new native thread.

    We discovered that the New generation heap was running out of memory. Upping
    "NewSize" for us has helped, but not gotten rid of the problem completely.

    We're now on CF 7.0.1 Enterprise/multiple instance, W2k3 SP1, JRun Updater 6
    and still get the error from time-to-time.

    ke4pym Guest

  11. #11

    Default Re: unable to create new native thread

    Coldfusion:
    -Coldfusion MX 7.01 enterprise edition
    -all updates and hot fixes loaded
    -using cfm as a single installation (in the process of reconfiguring to jrun
    with multiple instances)

    Server:
    -Windows advanced server 2003 enterprise edition
    --IIS 6.0 running in 5.0 isolation mode
    -version 5.2 (Build 3790.srv03_rtm.030324-2048)
    -4 cpu Xeon 2.0 Ghz
    -3.71 GB Ram


    Do you need any additional information? Thank you for your help.


    Magnus_The_Great Guest

  12. #12

    Default Re: unable to create new native thread

    You should setup seperate jvm.config files for each instance (I don't know if
    the instance configurator will do that for you - though).

    To turn on verbose logging:

    In your jvm.config file in the java.args section append (keep in mind that if
    you're only using one jvm.config file, every instance you have running is going
    to start logging):
    -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC

    It'll write out log data to <cfusion-instance-name>-out.log When the system
    crashes go back and read the first few hundred thousand million lines for any
    out of memory errors (or the like).

    Don't leave this on all the time though, it'll eat up server resources. Also,
    what version and type of JVM are you running? We noticed a pretty good
    increase in using Sun's 1.4.2_08.

    ke4pym Guest

  13. #13

    Default Re: unable to create new native thread

    We are only running one instance and currently using the following Java:

    JVM Details
    Java Version 1.4.2_05
    Java Vendor Sun Microsystems Inc.
    Java Vendor URL [url]http://java.sun.com/[/url]


    Magnus_The_Great Guest

  14. #14

    Default Re: unable to create new native thread

    <bump> - Problem still occuring
    Magnus_The_Great Guest

  15. #15

    Default Re: unable to create new native thread

    I updated the CF to 7MX with the latest patches. I noticed one thing that I
    think may have been causing the problem..

    Every time the server has crashed I notice that there was a service

    "WinHTTP Web proxy Auto-Discovery service" That would idle and then go into
    the stop state. So I turned this service off. I have been up every since. It
    has only been a couple days though so I will have to keep an eye on it.

    Go back and check your event viewer in the System event viewer. You will
    notice that the error will be like

    "winHTTP Web Proxy Auto-Discovery Service entered the stopped state". It
    seems stupid but the event is always right at the same time my sever freezes
    with the above erors.

    This would explain weird freezes at 4 am when nothing is going on and the
    server is at low usage.

    I am hooking to a MS SQL database and the service must cause a problem with
    the connection which starts the threads spinning out of control until the
    memory fills up.



    scooter000007 Guest

  16. #16

    Default Unable to Create New Native Thread

    We have two Win2k3 IIS CFMX webservers in a DNS roundrobin. Periodically, they
    will report "JRun closed connection", and we will have to restart CFMX to get
    it functional again. The errors that show up in the CFMX error logs are:

    java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start(Native Method)
    at jrunx.scheduler.ThreadPool.spawnHandler(ThreadPool .java:209)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.createRu nnable(ThreadPool.java:374)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.createR unnable(ThreadPool.java:239)
    ... followed by a metric ton of:
    java.lang.RuntimeException: Request timed out waiting for an available thread
    to run. You may want to consider increasing the number of active threads in the
    thread pool.
    at jrunx.scheduler.ThreadPool$Throttle.enter(ThreadPo ol.java:115)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRu nnable(ThreadPool.java:423)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeR unnable(ThreadPool.java:264)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java :66)

    This occurs on both servers. Servers have 4gb ram, and 1280mb minimum/maximum
    heap size (we were unable to get CFMX to even work with larger than that). The
    JVM arguements we pass are:
    -server -Dsun.io.useCanonCaches=false -XX:NewSize=512m -XX:MaxNewSize=512m
    -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC
    -XX:ParallelGCThreads=8 -XX:+UseAdaptiveSizePolicy -XX:MaxTenuringThreshold=0
    -XX:SurvivorRatio=128 -Dcoldfusion.rootDir={application.home}/../
    -Dcoldfusion.libPath={application.home}/../lib

    ... memory on the jrun process is almost always maxed out at ~1400mb memory.
    There was some conjecture I read online (
    http://www.talkingtree.com/blog/index.cfm/2005/3/11/NewNativeThread ) that
    hinted the problem might not be actual memory, but rather thread limits from
    the OS. Does anyone have any advice?

    Fireye- Guest

Similar Threads

  1. Failed to create thread
    By wikimanuel in forum Macromedia Flash Flashcom
    Replies: 1
    Last Post: March 5th, 08:20 PM
  2. cf7 win2003 and "unable to create new native thread"
    By cfartsask in forum Coldfusion Server Administration
    Replies: 0
    Last Post: January 28th, 10:30 PM
  3. MX 6.1: unable to create new native thread ?
    By scooter000007 in forum Coldfusion Database Access
    Replies: 0
    Last Post: December 2nd, 01:42 PM
  4. How to create a forum thread view ?
    By Victor BX in forum Macromedia ColdFusion
    Replies: 4
    Last Post: May 19th, 02:36 PM
  5. Thread Unable to Impersonate (Workaround)
    By Sam Page in forum ASP.NET Security
    Replies: 3
    Last Post: October 30th, 12:42 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139