Tomcat system resource occupies 90%

xiaoxiao2021-03-06  41

Topic: Tomcat system resource occupies 90% .. Print this Page

1.Tomcat system resource accounts 90% .. Copy to ClipboardPosted by: mousetailposted on: MouseTailposted on: 2003-07-03 13:17 Do you have recently used Tomcat4 in developing JSP's webpage, often Tomcat system resources account for 90% Othergoing reopening, or the system will hang up. Is it that I didn't pay attention to where did I not pay attention? The environment: Win2k Tomcat4 JDK1.3 Thank you

2.RE: Tomcat system resource accounts 90% .. [Re: mousetail] Copy to clipboardPosted by: kojiposted on: 2003-07-03 13: 48jdk1.4.2tomcat4winxp will not give me a chaotic performance machine level?? Or Other possibilities, it should be difficult to say, but I don't recommend it to write it yourself in WIN. Otherwise, I feel that Win often has something to give me empty. No one is using him, I don't know if I feel true. Well, standing platform Linux or freebsd to play eight good luckkoji

3.RE: Tomcat system resource accounts 90% .. [RE: MOUSETAIL] Copy to clipboardposted by: mousetailposted on: 2003-07-03 17:59 Thank you WinXP really can't eat it, you will be developed There is no situation outside the situation, I think so but I want to see BOOK will be installed ^^ I do you say that it is a problem or an environmental problem? Thank you

4.RE: Tomcat system resource accounts for 90% .. [Re: mousetail] Copy to clipboardPosted by: alantingposted on: 2003-07-03 18:18 I used Win 2000 Server Resin, machine grade race 800 .. Overclocking to 850 =. =, Remember the billion body 256, running, I think nothing, I don't want Win2K questions.

5. RE: Tomcat system resource accounts 90% .. [Re: mousetail] Copy to clipboardposted by: kojiposted on: 2003-07-03 18:21 Your program, you can see which process you ran like this It should be not difficult to check, don't even look at it, then do it, see what you wrote, do you have anything like an endless back ring or what kind of thing ?? Environment settings ?? I don't know, Container Should not use too much to settle Ba Koji

6.Re: Tomcat system resource accounts 90% .. [Re: mousetail] Copy to clipboardPosted by: mousetailposted on: 2003-07-09 08:31 Hello, I found that this parameter becomes system Data does not release string st = ""; stringbuffer sb = new stringbuffer (); try {java.net.URL U; string thisline; try {// getting the content U = new java.net.URL (URLLLINK); Try {java.io.inputstream is = u.openStream (); int size = is.available (); while (true) {byte [] ch = new byte [size]; is.read (ch); string string string Strin NEW STRING (CH, "BIG5"); sb.append (STR); if (is.available () <= 0) Break;} is.close ();} catch (exception e) {system.err.println e);}}} catch (java.net.malformedurlexception e) {system.err.println (e);}} catch (exception e) {Out.println ("Exception Caught:" E.getMessage ());} ST = sb.toString (); as long as you will rush to 90% of Tomact, you can't release it for a long time ~~ Is I should implement a completely close? But I'm sb.close () has a mistake without this CLOSE this Method, how can I release it? Thank you 7.Re: Tomcat system resource accounts for 90% .. [Re: mousetail] Copy to ClipboardPosted by: snpshuposted On: 200 3-07-10 01: 04SB = NULL; let him be putted in Garbage Colleciton to put it in Finally, DB Connection Close is recommended to handle

8. RE: Tomcat system resource accounts for 90% .. [Re: mousetail] Copy to clipboardPosted by: worOkieposted on: 2003-07-10 02:05 I have not seen the content of the big discussion, if I have a winning question Please also please forgive IF (is.available () <= 0) Break; change to similar if (is.read (...) == -1) BREAK; the winter and winter should also have a better way to solve this 90% of the problem

9. Re: Tomcat system resources account for 90% .. [Re: mousetail] Copy to clipboardposted by: mousetailposted on: 2003-07-10 11:17 Thank you for each other, it is still changed to this, but still can't be the first Supreme query is normal, and then respond quickly, it starts to rush to 98% of Code: string st = ""; stringbuffer sb = new stringbuffer (); try {java.net.URL u; string thisline; Try {// Get the content of the web page u = new java.net.URL (urllink); java.io.inputstream is = u.Openstream (); try {int size = is.available (); while (true) { BYTE [] ch = new byte [size]; is.read (ch); string str = new string (ch, "big5"); sb.append (str); // if (is.available () <= 0 IF (is.read (ch) == -1) Break;} is.close ();} catch (exception e) {system.err.println (e);} finally {is.close ();}} Catch (java.net.malformedurlexception e) {system.err.println (e);}} catch (exception e) {Out.println ("Exception Caught:" E.getMessage ());} st = sb.tostring (); SB = NULL; Re-advice, Thank you 10.re: Tomcat system resource accounts for 90% .. [Re: mousetail] Copy to ClipboardPosted by: MouseTailposted on: 2003 -07-10 13:03 Sorry, ask again, it is the reason for the rebound, IF (is.available () <= 0) // if (is.read (ch) == -1) Break; regardless of Which one will not break because I have tried running 10,000 times, I can jump out of the ring. I will ask this question how to solve it. Thank you.

11. RE: Tomcat system resource accounts for 90% .. [Re: mousetail] Copy to ClipboardPosted by: biologicposted on: 2003-07-10 13:34

MouseTail Wrote: Sorry to ask again, the reason is that there is a rebound jump IF (is.available () <= 0) // if (is.read (ch) == -1) Break; no matter which one is not Because I have tried to run 10,000 times, I can jump out of the loop. I will solve this problem. Thank you.

Stringst = ""; stringbuffer sb = new stringbuffer (); try {java.net.url u; string thisline; try {// gets the page presentation U = new java.net.URL (Urllink); java.io .Inputstream is = u.openStream (); try {int size = 512; //iS.available (); while (true) {byte [] ch = new byte [size]; int result = is.read (ch) ; if (result == -1) Break; else {string str = new string (ch, 0, result, "big5"); sb.append (str);}} is.close ();} catch (Exception E ) {System.err.println (e);} finally {is.close ();}} catch (java.net.malformedurlexception e) {system.err.println (e);}} catch (exception E) {OUT .println ("Exception Caught:" E.GetMessage ());} st = sb.tostring (); sb = null; 12.re: Tomcat system resource occupying 90% .. [Re: mouseetail] Copy to ClipboardPosted BY: MouseTailposted on: 2003-07-10 14:37 Hello, thank you for your help, why is Size to be set to 512? int size = 512; //is.available (); because the length seems to have problems ... I use for for reading the wrong error ..java.lang.ArayindexOutofboundsexception Thank you

13. RE: Tomcat system resource occupies 90% .. [Re: mousetail] Copy to ClipboardPosted by: BiologicPosted on: 2003-07-10 15:13

MouseTail wrote: Hello, thank you for your help, why is Size to be set to 512? int size = 512; //is.available (); because the length seems to have problems .... I use for reading to get the value There is an incorrect error when there is an index value ..java.lang.ArrayindexOutofboundsexception Thank you

Set 512 is fear IS.available will first catch 0 ... Question I don't know. Question: I can't compile ... so there is no way to solve.> _ <

14. Re: Tomcat system resource accounts 90% .. [Re: mousetail] Copy to clipboardPosted by: mousetailposted on: 2003-07-10 15:51 What is it is really caught 0 but this is Why, then I will change the 512 to a little bit 1024, but if the value of the return in one day is big, is it not enough? Thank you! !

15. RE: Tomcat system resource accounts for 90% .. [Re: mousetail] Copy to ClipboardPosted by: BiologicPosted On: 2003-07-10 16:15

MouseTail wrote: You said to is.available really caught 0 but this is why, then I will change 512 to a little 1024, but I can have a big return in the day, is not enough? What? Thank you! !

Because the just connection is possible not to pass it to the client end, available () is very likely = 0.available () is the information that is read in the client side. If the value is large, you will read, save a point. Eg Read (CH); append (ch, off, len); good, I have limited capacity (I asked me to bald it), wait for you to ask Home, he can give you the most careful and most standard answer. 16 .Re: Tomcat system resource occupies 90% .. [Re: mousetail] Copy to clipboardPosted by: mousetailposted on: 2003-07-10 17:40 I have to find a file append (char [] str, int offset, INT LEN) OFFSET is the index of the first character to append. It is the first index of the back of the biography string? Isn't it fixed? How do this value take .... Thank you for your enthusiasm! !

17.RE: Tomcat system resource occupies 90% .. [Re: mousetail] Copy to clipboardPosted by: snpshuposted on: 2003-07-11 01: 05biolog has given the right direction .. Next, you will see you .. Previously, I have been successfully repaired, read Mail letters, because the letters are very large, it is easy because of the need to deal with Mine Type many times, but this time the memory is easy to violent ... light is the temporary variable Scary, based on your program demand should be appropriate to adjust variables to handle the efficiency of the modified process, often written with usa ----------------- Tune It's also quite fun ... PS: try catch does not need that multiple layers ...

18. RE: Tomcat system resource accounts 90% .. [Re: mousetail] Copy to ClipboardPosted by: mousetailposted on: MouseTailposted on: 2003-07-12 11:55 Thank you. My program is the above. The question is Size. If it is fixed ... Sometimes, it will be broken, and you will be very good, thank you for your enthusiasm !!!

19. Re: Tomcat system resource occupies 90% .. [Re: mousetail] Copy to clipboardposted by: worOkieposted on: 2003-07-12 12:34 Solving this method to solve: InputStream.Read Byte [] b, int off, int LEN) where Len <512 is fine

转载请注明原文地址:https://www.9cbs.com/read-86486.html

New Post(0)