2013年12月4日星期三

tomcat tuning

tomcat 's outofmemery been plagued until now, the amount of data I get from the database are not great, so most will be 500,000 , less than 2M data. How will heap memory overflow it?
asked tomcat how to deploy , to let him outofmemery? Please major fairy pointing.
------ Solution ---------------------------------------- ----
http://jc-dreaming.iteye.com/blog/508639

Try
------ Solution ---------------------------------- ----------
you sure that tomcat out of memory it?
------ Solution ---------------------------------------- ----
best to keep a detailed log catalina.out sent to look .
In addition , tomcat expand initialization, maximum memory , or a good search of .
------ Solution ---------------------------------------- ----
once you remove the 500,000 data ? !
------ Solution ---------------------------------------- ----
50 W and 50W pieces of data objects , you look at the difference between the two .
------ Solution ---------------------------------------- ----
use HashMap or ArrayList?
Oh, that can be more than 500,000
------ Solution ------------------------------ --------------
with jvm parameters , set the memory like a
------ Solution ------------- -------------------------------
jvm memory exception is if it is determined , you can make the following adjustments:
tomcat installation directory under the bin directory ( eg : f: \ Program Files \ Apache Software Foundation \ Tomcat 6.0 \ bin) under a tomcat6w.exe, double-click operation, set the java tab three parameters (Initial memory pool, Maximum memory pool and Thread stack size) can be.
------ Solution ---------------------------------------- ----
with jvisualvm see under the specific occupancy of memory, which is an object representing a specific memory , leading to overflow
------ Solution ----------- ---------------------------------
landlord what technology you use ? I have encountered it before the data 50W 2M what a good little ah
------ Solution ------------------ --------------------------

just to solve my problem , Thanks
----- - Solution --------------------------------------------
really tough , ah, I'll try to download
------ Solution -------------------------------- ------------

------ Solution ------------------------------------ --------
encounter jvm memory problems , we recommend a closer look http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html.
------ For reference only -------------------------------------- -

I have here is a piece of data objects
------ For reference only ----------------------- ----------------

OK , or heap memory overflow
------ For reference only --------- ------------------------------
the first time to see , try it .
---- - For reference only ---------------------------------------
the first one back to see , try it.  
I used to do a project , the client export reports , and occasionally on the memory overflow , I use this method , the three parameters are set to 2 times the original problem has been solved .
------ For reference only -------------------------------------- -
landlord issues not resolved yet
------ For reference only --------------------------- ------------

I have here a data object is a  
Since you piece of data is an object, then you would not object 50W 50W simple pieces of data so simple , ( after the data into an object instance , take up memory will rise sharply , but also to open a sufficient memory large contiguous space for you . )

give one example, the linear structure of 1,000 objects and 1,000 objects , and what do you think the big space occupied , how much will be big !
------ For reference only -------------------------------------- -
suggest you use JDK comes with tools (C: \ Program Files \ Java \ jdk1.6.0_10 \ bin \ jvisualvm.exe), you can check your memory, what is the specific object takes up a lot memory
------ For reference only ------------------------------------ ---

没有评论:

发表评论