Java Process consumes my CPU - Why??

I'm confused. I have an application where you click a button and a thread is created which loads a web page and extracts some information from it. I've posted the code below. However, after I click my button, my system practically locks up while this job is running. Anyone have any ideas why? I'm running on a PC with WindowsXP. No matter what this thing is doing, and since there is no disk access, shouldn't windows do it's thing and give the proper cpu time slice and not bog my system?? What gives??
Thanks
     public boolean update() {
          Object[] stationNames = JGToolConfig.getStations();
          ArrayList itemData = hts.getPage("http://jossh.com/database/inventory/inventory.txt");
          Object[] array = itemData.toArray();
          for(int i=1; i< array.length; i++) {
               StringTokenizer tokenizer = new StringTokenizer((String)array, ",");
               String[] tokens = new String[5];
               for(int j=0; tokenizer.hasMoreTokens() && j<5; j++) {
                    String str = tokenizer.nextToken();
                    int x = str.lastIndexOf("\n");
                    if(x>0) str = str.substring(0,x);
                    tokens[j] = str;
               updateStation(tokens[0], tokens);     
          return true;          

Thanks all, but please don't reply. I found the problem. I won't go into details, but as usual, the problem was some left-over code I thought I removed that was reading a file from disk a few hundred times. :-)

Similar Messages

  • Java process consuming 100% CPU

    I have two JVM running on my Application tier and both of them consuming 50% each of CPY resources. I searched and found some inactive sessions under them. Even after release those inactive sessions nothing has come down. Still 100% is there. Is there anything else I can check
    PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
    22018 oracle 46 10 10 783M 709M cpu0 303.8H 51.92% java
    22014 oracle 48 1 10 685M 613M run 233.3H 39.95% java

    Hi,
    Can you confirm your version of JDK and ATG patchlevel ? I've seen this as a problem which was partially addressed by moving to ATG RUP 5.
    Rgds,
    Rakesh

  • Java process take 100% cpu

    Hello,
    I have a webapp running on Tomcat 5.0.28/RHEL 3.0. After some time (approximatively 1 hour), a java process take 100% cpu load and never stop, but the application do nothing.
    Some detail on my configuration :
    Distribution : Redhat Enterprise Linux 3.0 (updated)
    Kernel 2.4.21-37.0.1.ELsmp
    Glibc 2.3.2-95.37
    JVM : JRockit 1.4.2.08 (the last one)
    Tomcat : 5.0.28
    Server : 2*Xeon 3GHz HT, 2Go RAM
    JVM param : -Xmx:256m -Xms:256m
    Thanks for your answers ...

    Try taking thread dump (send a SIGQUIT to JRockit using "kill"). If you
    get a thread dump, the VM is alive, and it's probably your java program
    that's broken. In that case, make a JRA recording to see what's happening:
    http://e-docs.bea.com/jrockit/docs142/usingJRA/jra.html
    The methods pane is probably what you're looking for.
    If you don't get any thread dump when sending a SIGQUIT to JRockit,
    come back here.
    Regards //Johan
    Gr?goire Rolland wrote:
    Hello,
    I have a webapp running on Tomcat 5.0.28/RHEL 3.0. After some time (approximatively 1 hour), a java process take 100% cpu load and never stop, but the application do nothing.
    Some detail on my configuration :
    Distribution : Redhat Enterprise Linux 3.0 (updated)
    Kernel 2.4.21-37.0.1.ELsmp
    Glibc 2.3.2-95.37
    JVM : JRockit 1.4.2.08 (the last one)
    Tomcat : 5.0.28
    Server : 2*Xeon 3GHz HT, 2Go RAM
    JVM param : -Xmx:256m -Xms:256m
    Thanks for your answers ...

  • Java Process Consuming 100% of Server CPU

    Hi,
    We have a new instance of CQ5 (version 5.4) running on a Windows 2003 SP2 Server. For some reason, which we can't determine, after a period of time a Java process on the system begins to consume 100% of the CPU and the system becomes totally unresponsive. Has anyone seen this before? Is there a fix for this?
    RK         

    Does the it eventually recover on it's own? It's possible that the JVM is doing full garbage collection.  How big is your max heap size?  I suggest to add some garbage collection debugging in the JVM_OPTS to see if it is Java's garbage collection or not.  Might as well check the heap too, to see if it's running our of memory.
    Example;
    -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -Xloggc:/tmp/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp
    Ron

  • Java Process with High CPU

    I have a java process running on HP-UX with a 1.4.2 JVM. This program is using some third-party code (quartz) to act as a batch scheduler similar to cron. When running in production, the process runs fine for several days and then starts maxing out the CPU. The server has 8 cpu's and the last time the problem occured, 4 of the cpu's were 100% in use with this process.
    I've tried sending a "kill -3 pid" but I can't seem to get a thread dump. I've eventually gotten some 700Meg core files. Is there anyway to use these core files to tell me what is going on?
    Any ideas on how to trouble shoot this problem? We've used some profilers but we can't duplicate the problem on test servers so we aren't learning anything new.
    Thanks,
    Brian

    Try pstack to read the stacks of the threads in the process.
    Try pldd to determine the shared libraries in the process then
    use truss to trace calls in any of these libraries to determine where
    the cycles are being spent.

  • Query to find out which process consuming more cpu?

    Hi All,
    some one please tell me the query to find out which process is consuming more
    cpu resources?
    Thanks and Regards
    Srikanth

    Use V$SESSTAT to determine which sessions are using most CPU, and investigate what SQL these users/sessions are executing:
    SQL> select ss.sid, se.command, ss.value CPU, se.username, se.program
    from v$sesstat ss, v$session se
    where ss.statistic# in
    (select statistic#
    from v$statname
    where name = 'CPU used by this session')
    and se.sid=ss.sid
    order by ss.value desc;

  • FNDOPP process consumes 200% CPU even though request count is less

    Hi Guys,
    We have problem with FNDOPP services in R12.1.3 with database version 11.2.0.3
    Its a multinode environment with RAC database and shared Appl_top with PCP.
    The problem is that FNDOPP process at OS level is consuming 200% CPU
    we have defined 4 threads for OPP in our production environment. with server having 24 CPU on each application node.
    Also Post processing action Concurrent Request takes long to process with OPP.
    Please suggest what areas to look into bring down load on OPP and hence CPU consumption through OPP process.
    Your help is appreciated.
    Regards,
    Milan

    Please see the following docs.
    R12: Troubleshooting Known XML Publisher and E-Business Suite (EBS) Integration Issues [ID 1410160.1]
    EBS - Technology Area - Webcast Recording 'BI Publisher / XML Publisher Overview & Best Practices - Webinar' [video] [ID 1513592.1]
    Poor Performance /High Buffer Gets In FND_CONC_TEMPLATES [ID 1085293.1]
    Performance Issue - PDF Generated With BI Publisher [ID 956902.1]
    Overview of Available Patches for Oracle XML Publisher embedded in the Oracle E-Business Suite [ID 1138602.1]
    Tuning Output Post Processor (OPP) to Improve Performance [ID 1399454.1]
    Thanks,
    Hussein

  • Distnoted process consumes +300% cpu on my macbook pro (early 2011) using Yosemite

    My fans keep ramping up on my macbook pro. I looked at processes using activity monitor, and noted that a process called distnoted was consuming +300% of the cpu. I've only been getting this problem on Yosemite, and didn't see any of this with the older OS X products. Is this something others are seeing, and more importantly whats the fix. Just searching around looks like this is a messaging function in kernal?

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

  • SMON process consume High CPU in production setup.

    Hi,
    Recently we migrate our storage from IBM DS4700 to IBM v7000. on last Saturday from yesterday and today cpu almost 100 percent in peak hours.
    Right now our datafiles in SSD and archivelogs in SAS disk.
    Please suggest
    regards,
    Karthi.

    Hi Karthi,
    Which SMON process is consuming CPU ,I mean,Database SMON /ASM SMON if is in use.
    + Install and enable OSwatcher with atleast 30 seconds interval and monitor which process /what is causing high CPU.
    + If they are oracle processes ,then validate what are they doing at database level .
       Does it comes from any application code ,if so validate those sqls.
    + Install procwatcher to understand what are they doing .
    Refer::-----------
    ==============
    Procwatcher: Script to Monitor and Examine Oracle DB and Clusterware Processes (Doc ID 459694.1)
    + Then as per your environment get pstack/procstack of that process in 30 seconds interval for 3-4 times .
    If try to identify the issue ,if required please open service request with us.
    Regards,
    Aritra

  • How to restart a java process in Oracle AS 10g

    Hi
    In Oracle AS 10g, the java process consumes 50% cpu resource due to the report invoked by a user. Now I need to restart the java back ground process?, please reply me with the syntax or with examples.
    ps -eaf
    CPU PROCESS
    50% /ORACLE_HOME/jdk/jre/bin/java -server -cp /report/oracle
    Thanks in advance
    Bala

    The copy method being using is unsupported, hence the target Portal would be in an unsupported state.
    This is unsupported as per the following note:
    Note 333867.1 - Portal Export and Import Utility Supportability Scenarios :
    Copy operations after an object is renamed:
    Exporting and importing a page group, then renaming the page group on the target system (to create a copy) and repeating the export and import operation.
    OR:
    Exporting and importing a page group, then renaming the same in source or target and repeating the export and import operation.
    Not supported.
    Please do not rename objects if you plan to perform export and import operations.
    Note: The display name can be changed, but internal name change is considered a renaming operation.
    In 10.1.4, renaming is supported, but renaming page group and pages with the intention of copying them is not supported..."

  • Java consuming 100% cpu  urgent

    hi
    Users are complaining about application slowness to login when i check the top process in linux it shows java process consuming 99.9% of cpu.how can i check which process is consuming and what its doing exactly and how to prevent it
    with rgds
    shyam

    The recommended setting for JVM is as follows:
    - No more than 100 active users per JVM
    - No more than 1 active JVM per CPU (Ideally 1 JVM per 2 CPUs)
    - Make sure you have enough memory so your JVMs will be running without swapping
    For the max.heap memory, Oracle recommends:
    -ms128m -mx256m if you have 512 MB memory
    -ms256m -mx512m if you have more than 512 MB memory
    In addition, verify that you do the following in jserv.properties:
    - Make sure you have 'wrapper.bin.parameters=-DLONG_RUNNING_JVM=true'
    - Make sure you comment out 'wrapper.bin.parameters=-DCACHEMODE=LOCAL'

  • Clouds process consuming 100% of cpu

    Whenever MBP is not able to connect to internet, the cloudd process consumes 100% cpu.
    This is draining the battery in a very short time.
    Internet connectivity, either lack there of or because of corp. firewall rules send this process into 100% consumption.
    Only work around is to disable all items in iCloud control panel, which is painful for access and re-sync.
    Robert

    Does the it eventually recover on it's own? It's possible that the JVM is doing full garbage collection.  How big is your max heap size?  I suggest to add some garbage collection debugging in the JVM_OPTS to see if it is Java's garbage collection or not.  Might as well check the heap too, to see if it's running our of memory.
    Example;
    -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -Xloggc:/tmp/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp
    Ron

  • Java process didn't stop.

    hello,
    i'm runing oas10gR with Forms services. i have 2 java processes consuming 100 % of the cpu time ( nice time ).
    when a stop the oas with "opmnctl stopall" the java processes hagings didn't end !
    i'm asking why these java processes are spending all the time in "nice time" and where they didn't end ?

    Sounds like the processes are waiting for something (check out the logfiles in $ORACLE_HOME/opmn/logs). If you want to shutdown them forcefully you can issue opmnctl shutdown instead of opmnctl stopall.

  • Java process stuck problem

    In our customer site, we have faced the critical issue.
    Suddenly, the server process(java) was stopped (we called this status as stuck status)
    so that the command from clients program did not send to server and message did not received from server.
    In this status, we have found the peculiar status in server as follows.
    1. The log files of server did not be written no more.
    Of course, java process is alive.
    When this stuck status is occurred, then all log writing operations are stopped.
    2. Although we commanded "kill -3 processID" to get the stack trace of java,
    but there is no print-out of stack trace.
    Of course, the result of stack trace was displayed with kill -3 command in ordinary status.
    3. Although java process(server process) is alive by checking ps -eaf UNIX command,
    we could know that the process did not operate because the result of top command in UNIX for java process is
    0 % in CPU usage.
    Since our java process always operates with client, DB and nodes,
    there is no case which java process has 0% CPU usage.
    4. When the stuck status is occurred, RMI lookup is failed.
    5. This stuck issue was evenly occurred for period with about 2 ~ 3 days.
    Sometimes, this issue was used to be occurred at 10 minutes of startup time of server, too.
    First time, we have focused that there was no writing of logs.
    Thus, we have found that Process.destroy() method has the bug to kill the subprocess in UNIX
    with URL <ahref="http: //bugs.sun.com/bugdatabase/view_bug.do?bug_id="6469606" target="_blank">http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6469606 from SUN site.</ahref="http:>
    And we have concluded that this stuck issue was occurred from this bug.
    Hence, we have released with fixed patch in customer site.
    However, we have faced the stuck issue with release patch again.
    We are falling in confusion right now.
    And our customer is pushing the solution to us because service is running.
    We eagerly want to get the reason why this stuck issue is occurred from you.
    However, we know that you have high technology for java.
    We want to get the following consulting opinion.
    1. Is there the method of class in java which the stuck issue can be occurred?
    2. Is there the tracing method or trial method to find the reason for this issue?
    We eagerly want to get your wise consulting to solve this issue.
    Please let us know your know-how.

    Thus, we have found that Process.destroy() method has
    the bug to kill the subprocess in UNIX
    with URL <ahref="http:
    //bugs.sun.com/bugdatabase/view_bug.do?bug_id="6469606
    target="_blank">http://bugs.sun.com/bugdatabase/view_b
    ug.do?bug_id=6469606 from SUN site.</ahref="http:>
    And we have concluded that this stuck issue was
    occurred from this bug.
    Can I assume that you are using Runtime.exec() to get the Process?

  • Syslogd Consuming more CPU utilization in Solaris 10

    Hi All,
    The Syslogd process consuming more CPU utilization in Solaris 10. Kindly help how to reduce this cpu utilization.
    Regards
    Siva

    Hi Robert,
    Both are same architecture. x86
    The following is the prstat o/p from the affected server. Pls note that one of the mount point in this server is in ZFS.
    prstat -l
    PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/LWPID
    26092 root 3933M 3930M cpu1 60 0 29:00:43 22% syslogd/56
    26092 root 3933M 3930M run 30 0 289:47:33 12% syslogd/18
    26092 root 3933M 3930M run 40 0 272:31:05 11% syslogd/22
    26092 root 3933M 3930M run 22 0 14:47:16 9.7% syslogd/65
    26092 root 3933M 3930M run 42 0 14:43:46 9.7% syslogd/63
    26092 root 3933M 3930M run 31 0 14:40:42 9.6% syslogd/66
    26092 root 3933M 3930M sleep 40 0 152:45:42 5.9% syslogd/21
    26092 root 3933M 3930M cpu0 53 0 6:41:58 4.1% syslogd/58
    26092 root 3933M 3930M run 52 0 6:23:13 4.0% syslogd/57
    26092 root 3933M 3930M sleep 43 0 6:29:21 3.9% syslogd/59
    26092 root 3933M 3930M sleep 52 0 5:55:14 3.6% syslogd/71
    More over we are continuously receiving the below error message in the /var/adm/messages, we don't know, from where the error arises from the syslog server.
    syslogd: malloc failed: dropping message from remote: Not enough space
    PRIVILEGE :[4] 'NONE'
    Edited by: Siva_Systems on Mar 29, 2010 5:06 AM
    Edited by: Siva_Systems on Mar 29, 2010 8:18 AM

Maybe you are looking for

  • Misc Basic PL/SQL Application Design/Programming Questions 101 (101.1)

    ---****** background for all these questions is at bottom of this post: Question 1: I read a little on the in and out parameters and that IN is "by reference" and OUT and IN-OUT are by value. To me "by reference" means "pointer" as in C programming.

  • Moving Columns in Jtable. Columns not in sync with header

    Hi, I got several tables within a scrollPane. So I use the add method on the scrollPane to add them. In order to see the headers I add the header separately : add(table.getTableHeader()); add(table); The problem is the following : When I am moving my

  • For created in acrobat pro is empty

    Hello, I've created a form using adobe acrobat pro for Mac.  I sent it to a coworker who is also on a Mac and he filled it out.  He then emailed it to another co-worker who is using a PC.  When the PC co-worker received the form, it was blank.  when

  • Changing xmlschema while parsing with sax

    Hello world, I`m using the sax-parser (xerces) and i want to combine different schema-files to parse an xml-String; <root>      <intervall>1,5</intervall>      <nix>jetzt echt nix!</nix>      <testtag>           <text>huhu joe</text>      </testtag>

  • The latest update install without my permission, how I do to delet it

    The lasted update install it self without my permission. You had remind me everyday to install it, but I deny because I need my RoboForm very much, but now it's gone. I need it so badly How I do to take it away, because I wanted to wait until RoboFor