Modpacks may require more. Correct: java -Xmx1024m -jar JavaApplication. For example;I know its a silly discussion but, I found this on a thread "Go to SteamsteamappscommonProjectZomboid Edit the ProjectZomboid64. What is XMax (XMX)? Let's take a look!Join our discord group for FREE! discord. 448. thank you. Start Tomcat with startup. It‘s working pretty smooth and I‘d recommend adding No-IP domainservice, for a constant IP-Update. It can take a while and the application is frozen. . I think you have to paste that in the user_jvm_args. It is just that they are system. New replies are no longer allowed. bat Change the -Xms - Xmx to -Xms4gG -Xmx4G for example to set the ram to 4 GB. I've been told that 32-bit Java cannot handle more than 4GB of RAM allocation. Run the game with the bat. Share. bat Change the -Xms - Xmx to -Xms4gG -Xmx4G for example to set the ram to 4 GB. The -Xms option sets the initial size of the heap, while the -Xmx option sets the maximum size of the heap. I know its a silly discussion but, I found this on a thread "Go to SteamsteamappscommonProjectZomboid Edit the ProjectZomboid64. Open sts in Windows menu select Preferences then from General tab. # Uncomment the next line to set it. -Xms8g To set the maximum heap size use -Xmx e. I also just upgraded to 64 bit java. I've wanted to figure out is there a way to set fixed cache size on legacy. Up to 50,000 users and 500 groups: Medium: 4 vCPU, 8 GB RAM, 40 GB Disk Space. I'd like to increase the amount of RAM, preferably up to about 3GB (obviously I know how to do that, just increase the -Xmx value). These flags work and scale accordingly to any size of memory, even 500MB but modern Minecraft versions will not do well with such low memory. There are around 8 instances / server with 4GB JVM settings (-Xmx 4GB -Xms 4GB). The server have CPU 16 and Memory for 64GB. 0 x16 ATX Video Card GTX 1050 Ti GAMING X 4G. For memory-intensive apps like Kafka or Elasticsearch, XMX of 4-8GB is common. If -Xmx is passed, the JVM will ignore -XX:MaxRAMPercentage (respectively, if -Xms is passed, the JVM will ignore . Note that this option is in Megabytes, a Gigabyte is approximately 1024 Megabytes. XMX is an option in Java to set the maximum amount of memory your application can use (see, International - English. I have some doubts how the JVM garbage collector would work with different values of Xmx and Xms and machine memory size: How would garbage collector would work in following scenarios: 1. 2050 MHz. Issue. 19 to Java 1. September 4, 2012 at 1:28 PM. # For example, to set the maximum to 3GB: -Xmx3G. maxMemory ();The JVM Startup Flags to use – MC 1. # They can take any number, followed by an M or a G. Either you can install 64bit JVM, or set the maximum heapspace to 2GB with -Xmx2048M. Enable “for imports” and “for builds” and then click “OK”. To further protect against JVM optimizations, I've actively allocate X number of 10MB objects. jar noguiTick the box next to 'JVM Arguements'. Solaris goes closer to 4GB by allowing up to 3. The amount of available RAM will dictate how much memory you can allocate to Minecraft. It is particularly useful for java applications with large heaps. config from within Wordpad. # Possible reasons: # The system is out of physical RAM or swap space. # Xmx and Xms set the maximum and minimum RAM usage, respectively. However -Xmx does not limit the total amount of memory that the JVM can use. The -Xmx 4G option simply determines the maximum amount of memory that Minecraft can use, it does not mean that Minecraft are forced to use that amount of memory. Try doing this: System. I change xms and xmx (advanced settings) from xms:256 / xmx:1024 to xms:500 / xmx:1048. I know. g. So I moved to my data to a new server which has 16 GB RAM. 6G (approx). - I've been told that 32-bit Java cannot handle more than 4GB of RAM allocation. Click on “Instances” in the sidebar. -Xmx) is less than 32GB. Out of system resources. json" so the game will always launch with that much ram without having to run the . JetBrains Rider also warns you if the amount of free heap memory. If these Class Pointers, Monitors/Locks and Java heap (if included) cannot fit in the lower 4GB, a native out of memory (NOOM) will be thrown. raw download report. Edit: Solved, just set them both to the same value! ---. The "-Xms" flag will set the initial size, which is 4GB and "-Xmx" will set the max flag, which is 6GB. This is the reason 32-bit JVMs are limited to a maximum heap size of 4GB (in reality, the limit is smaller due to other JVM and OS overhead, and. ) ATLauncher. That will allow a max of 1GB of memory for the JVM. exe -Xmx4096M -Xms2048M -jar <location of your Minecraft exe> So basically, the xmx is your maximum RAM your allocating and your xms is the minimum ram it should use. In this example, we set the initial heap size to 512 megabytes (Xms512m) and the maximum heap size. Peter Lawrey. 448. Closing the Studio in a normal way is not possible (kill -9 will do the job though) and in general it slows down the whole system performance. X e Vector Engines. Core Clock: 1379 MHz (OC) 1354 MHz (Gaming) 1290 MHz (Silent) Max Resolution: 7680 x 4320 DisplayPort: 1 x DisplayPort 1. You can check Minecraft server memory usage by using its built-in GUI. MXM Graphics Card Types, Models, Specifications, and List of latest MXM Graphics Modules for Laptops and Mobile Computers. I did the xms and xmx on the . 8 GB. In your case though it does sound like having a bit extra doesn't hurt. jar. There are flags you can set to limit the amount of metaspace that Java will use, but it's generally considered good practice to let Java figure out how much metaspace it needs without putting a hard upper limit on it. sh (for Linux/Mac) or setenv. Best values for min-max RAM, Xms & Xmx arguments. Sorted by: 2. The limit for maximum memory in 32-bit is useful for 4G connectivity. I have a Java microserive that is increasing in memory daily in production that I have just inheritted. A: การปรับค่า Xmx สำหรับตัวรัน Server minecraft นั้นคือ การกำหนดว่า เราจะให้เซิฟminecraft ใช้แรมได้มากสุดเท่าไหร่ เช่นเราตั้งว่า Xmx4G หมายความว่า เซิฟmc ของเราจะใช้. 4, Xms=2GB Xmx=4GB Xms=4GB Xmx=4GB should be plenty enough. jar. The limit for -XmX is -Xmx1500m on 32 bit windows. The default value is 25% of -Xmx and when -Xmx is set to -Xms the nursery will never grow. Run the game with the bat. In a Kubernetes cluster with numerous microservices, one of them is used exclusively for a Java Virtual Machine (JVM) that runs a Java 1. json" so the game will always launch with. Step 1: Open the Control Panel and click on the System icon. For version 1. 5G less then Xmx Xmx . bat, . So even if you've set Xms and Xmx to 4GB, you may find that Java is using 5GB of RAM when looking at the output of top. e. If your application exceeds the maximum memory (allocated using the Xmx) and the garbage collector cannot free up memory, the JVM will crash with. However, due to CR 440936 the Xmx value is not reverted back to default or recommended 1GB Xmx value. Does it mean OS can use up to (15-4)=11 GB out of which meta space memory will be allocated? Maybe: There will be other process on a Windows machine. json, the shortcut, and steam lauch options. As for the 6GB limit, I can think of multiple reasons. = 500mb. That invocation typically contains two options: -Xms - which is the minimum memory allocation for java, and. ; Mac - Open the Apple menu, click About This Mac, and look at the. I used to back Aikar's recommendations, until these later postings suggested using Xms = Xmx values. . This action changes the value of the -Xmx option used by the JVM to run IntelliJ IDEA. if the value of -Xms and -Xmx is same JVM will not have to adjust the heap size and that means less work by JVM. When Setting Xms and Xmx to equal values The JVM won't have to resize the heap and avoids the time that the JVM will spend on that . edited Sep 29, 2009 at. Minecraft creates a lot of short-lived objects, so it is better to set this to a larger. Under normal circumstances 4 GB is good and adding more will usually cause more problems then it solves due to how Java works (more specifically the garbage collection). 3 on x64 Java. 8 data processing application. 2 Likes. Not sure how much default is defined for heapsize? How much maxpermgen and xmx values are permitted for a given RAM (2gb/4gb)? Should I keep xmx and xms parameter equal or not? What is the. 3- Open the file and locate the part where it's written -Xms and -Xmx and change the number to the ram you'd like xms = minimum ram usable xmx = maximum ram usable Mine is -Xms1800m and Xmx4096m for 4 gb of ram max which is enough for heavily modded project zomboidThe recommended heap size for typical ingestion scenarios should be no less than 4GB and no more than 8GB. Using this plan, you can collect more than 40 mods or plugins. Also you need to add -Xmx to your launch params for your program not just for eclipse. ”. MXM Graphics Cards are removable graphics cards that are designed for gaming laptops or notebooks, All-in-one PCs, mobile workstations, embedded systems,. Problem Description. PAUSE. Sure use right java version. -Xms can be added to allocate RAM at the beginning, but is not required. json file or ProjectZomboid64. In Linux, the maximum per-process number of map areas is controlled by vm. set JVM heap size to be atleast 8GB. 979439 Dec 12 2012. ini file (to ~4GB) but that didn’t help. The changes above would increase the memory that the UniFi Network application is allowed to consume from 1 to 2GB. Restart JetBrains Rider for the new setting to take effect. 12. ZGC supports heap sizes from 8MB to 16TB. /bin. Minecraft Realms: RAM Allocation Is Automatic If you. 1 Answer Sorted by: 4 To set the minimum heap size use -Xms e. The limit depends on the system, if you got an error, try less allocation. # In 32 bit mode, the process size limit was hit. jar is the renamed forge-1. #7 ColeCraft, Jan 27, 2014. 1. 06 * 64 Gb = ~4 Gb (which is lower than 6 Gb). . This folder contains Minecraft_server. json" so the game will always launch with. The Change Memory Settings action is available starting from IntelliJ IDEA. 15. answered Sep 13, 2012 at 13:05. jar. Password. Run the game with the bat. 5GB: -Xms2500M # A good default for a modded server is 4GB. I am attempting to increase intellij xmx to 1. Copy snippet. Step-1. startup does not have any settings for it other than in the following stanza:"-Xmx 6G" - Sets the maximum allocated RAM of the Java application (Minecraft) at launch; you should always leave at least 1 GB left over (2 GB is highly recommended if it is available, which is what I did for my 8 GB RAM PC) for your system. max segment size: 2,5 Gb (-1 b) kernel. Example: dd if=/dev/zero of=zeros. Even when there are no records to sink, the worker java process is showing 100% CPU usage using xmx(4GB). ago. Change the -Xms - Xmx to -Xms4gG -Xmx4G for example to set the ram to 4 GB. 4 GB. 6. Remove '-Xmx1G' or the default setting and replace it with the desired amount of ram you want by using the key below (Note: Putting too much RAM may have bad effects discussed above). Share. (It appears this doesn't apply to your case). Basically, you need to leave memory for other process running on your operating system. (desired amount in MB) + 128MB (desired amount in GB) = (amount to allocate) 4GB = 4096MB. # They can take any number, followed by an M or a G. . Go to Apache Tomcat /bin directory. Change the Maximum Memory/Ram option to allocate more RAM as the default for all ATLauncher instances. GPConnect (Good Peoples Connected) October 31, 2017, 1:22pm 14. (i. 8+) Update. One option you could consider is setting the initial heap size (the -Xms part) to 1GB, and setting your maximum heap size (-Xmx) at something around 3. Process size grows very fast when JBoss is processing and caching annotations, which utilizes VFS a lot. However, If you have a modded version, then 8GB would do just fine. txt said to do to allocate more rame. Half the available memory with a minimum of 16 MB and a maximum of 512 MB. It is not required to set -Xmx in a production environment, but you could limit heap usage for your testing by supplying the -Xmx switch to Java. You'll need about 2Gb of RAM to do this. You have. I'm sorry I can't provide specifics to the mods you use, as I mainly administer bukkit servers, but allowing the server to use more RAM if it needs to can help. Change the -Xms - Xmx to -Xms4gG -Xmx4G for example to set the ram to 4 GB. I know its a silly discussion but, I found this on a thread "Go to SteamsteamappscommonProjectZomboid Edit the ProjectZomboid64. Make sure to not use all memory for the JVM heap but leave at least 50% of the system memory for use as disk buffer/cache. 072 0. If XMX is the pre-allocated RAM, hence the Minimum, why do we not e. The flag Xmx specifies the maximum memory allocation pool for a Java virtual machine (JVM), while Xms specifies the initial memory allocation pool. json" so the game will always launch with. zookeeper. If you want start Tomcat9w. You should change only Xmx. EDIT You need to understand that there are two types of "out of memory" errors. That would read: java -Xmx2048M -Xms2048M - jar server. java. The theoretical maximum heap value that can be set with -Xmx in a 32-bit system is of course 2^32 bytes, but typically (see: Understanding max JVM heap size - 32bit vs 64bit) one cannot use all 4GB. it all depends on the RAM size, you can extend it max upto RAM size. 8. # A good default for a modded server is 4GB. # They can take any number, followed by an M or a G. 7% increase since yesterday. # They can take any number, followed by an M or a G. The Xmx parameter specifies the maximum memory an app can use, where as Xms specifies the minimum or the initial memory pool. Does it mean OS can use up to (15-4)=11 GB out of which meta space memory will be allocated? Maybe: There will be other process on a Windows machine. Xmx to -Xms4gG -Xmx4G for example to set the ram to 4 GB. Modified 2 years, 9 months ago. This means that a JVM that has been allocated 4 GB may only have 3. However, the virtual machine is then unable to compensate if you make a poor choice. BTW: 4 GB of memory can cost less than $20. Java. 1 GB. # Start script generated by ServerPackCreator 3. Release Date: Q3 2022 for desktop. I know its a silly discussion but, I found this on a thread "Go to SteamsteamappscommonProjectZomboid Edit the ProjectZomboid64. director. Where it says "JVM Arguments" (at the bottom) type in: "-Xmx [amount of memory in GB]G -Xms [same amount of memory in GB]G". JVM的-Xmx选项指定了Java虚拟机堆的最大内存大小。. Restart IntelliJ IDEA for the new setting to take effect. 4 GB RAM, 40 GB Disk Space . If Java never uses more than 4GB, that almost makes it sound like Java is running similarly to a 32-bit version of Java. Java memory allocation for User Auth service or Kerberos Auth service: xmx=1g. If the same image is executed on a machine that has 32GB of RAM, the maximum Java heap size will be set to 25. Java memory allocation for User Auth service or Kerberos Auth service: xmx=1g. Syntax. Click on the settings button for the instance you want to allocate more RAM to. Qiita Blog. 0. 0. Lots of them. To start the server, I use this batch file: java -Xms8G -Xmx8G -jar forge. txt. JOB A (JVM -Xmx Memory 4GB)-- Calls Child Job B (will inherit -Xmx from Job A and will initiate with 4 GB RAM)-- Calls Child Job C (will inherit -Xmx from Job A and will initiate with 4 GB RAM) If Child Job B & C are being executed in Parallel, then your system needs 12 GB RAM, else your child job cannot start. MXM Graphics Card Types, Models, Specifications, and List of latest MXM Graphics Modules for Laptops and Mobile Computers. The -Xmx option changes the maximum Heap Space for the VM. Before J2SE 5. Here is my answer inline You can calculate the memory used by a JVM process as follows: JVM memory = Heap memory+ Metaspace + CodeCache + (ThreadStackSize * Number of Threads) + DirectByteBuffers + Jvm-native. So is 30MB for the entire JVM process. 堆外内存:除了堆内存,还有一些内存是由JVM管理的,比如栈内存、本地方法栈、方法区等。. Edit: Solved, just set them both to the same value! ---. Look out for an option like this: -Xmx2G-XX:+UnlockExperimentalVMOptions”. I had similar problem and this worked for me, hope this helps you as well. bat Change the -Xms - Xmx to -Xms4gG -Xmx4G for example to set the ram to 4 GB. While monitoring we also observed that CPU consumption (Almost >90%) during GC was very. Before moving to a machine with more CPU resources, it is recommended to max out the available memory on that machine with the above settings to see if CPU usage decreases. Spoiler: MultiMC 5-XX:NewRatio=3 -XX:SurvivorRatio=3 -XX:TargetSurvivorRatio=80 -XX:MaxTenuringThreshold=8 -XX:+UseParNewGC . The -Xmx and -Xms Java arguments are used to increase heap size. And it can be overridden using the -Xmx switch:. The exact specifications used in the use cases listed in this section are summarised in the table below: Scenario CPU Memory SI Memory Allocation. The default minimum and maximum size can be adjusted to suit your needs, but you should set the same minimum (-Xms) and maximum (-Xmx) size to prevent the JVM from making dynamic adjustments. 4 GB RAM, 40 GB Disk Space. Set XMX between 80% and 100% of the total physical memory on your machine. Edit the ProjectZomboid64. K8s. The JVM takes up room too. For example, starting a JVM like below will. This is the reason 32-bit JVMs are limited to a maximum heap size of 4GB (in reality, the limit is smaller due to other JVM and OS overhead, and. json" so the game will always launch with. Setting -Xms and -Xmx to the same value increases predictability by removing the most important sizing decision from the virtual machine. One of the processes is a WSO2ESB Server (java), we start it with those parameters: After a while we get an OutOfMemory Exception, but the java process (WSO2ESB) process is. Graphics Clock. The maximum theoretical heap limit for the 32-bit JVM is 4G. Accepted EULA. If your JVM is 32bit, then heap size should be lower than 4gb. jar nogui. . additional option with -Xmx wrapper. 5Gbps, a 64-bit memory bus width, and 4GB of GDDR6 video memory. 2 x Intel Xeon 3. This video shows you how to do it. I already adjusted the Xms (2GB) and Xmx (4GB) settings for Talend Studio but It's still slow as hell. ヒープは、JVM が起動したときに作成され、そのサイズはアプリケーシ…. Kubernetes schedules pods on nodes based on their request parameter, not the limit parameter. So, i would try, for example, to double it and. Java memory allocation for Directory Sync service: xmx=4g. 0. Yet I would advise you set -Xms to 4G as well so as to see if you do have enough memory and can reserve for your JVM process. On Windows, use the following command to find out the defaults. Xmx: 4GB. Changed the MOTD and server size. I use apache-tomcat-9. If you want to set minimum and maximum RAM, try this: java -Xms4096M -Xmx6144M -XX:MaxPermSize=128M -jar spigot. java -Xms#$ -Xmx#$ -jar &" Key: # = Amount of --> $ = G for gigabyte, M for megabyte, and B for byte;. Is there a straightforward way of setting the maximum heap to X percent of the physical memory of. From OpenJ9 release 0. Xmn is minimum (starting value actually). # Use 64 bit Java on a 64 bit OS. Note: Never try to give Minecraft more Ram than you have! I know its a silly discussion but, I found this on a thread "Go to Steam\\steamapps\\common\\ProjectZomboid Edit the ProjectZomboid64. Maximum Heap can be allocated for 32bit JVM is 2^32 = 4G, Again 4gb will be devided into 1+ GB for VM to use for runtime classes. config in the <FOGLIGHTHOME>config directory. Por ejemplo, si deseas asignar 2 GB de RAM, debes introducir 2048. # M means Megabyte, G means Gigabyte. If you were to provide some sort of a check list to close in on the problem what will. This changes the value of the -Xmx option used by the JVM and restarts IntelliJ IDEA with the new setting. The above parameters increase the InitialHeapSize (-Xms) to 4GB (4096 MB) and MaxHeapSize(-Xmx) to 6GB (6144 MB). 1. json" so the game will always launch with. Xmn is minimum (starting value actually). jar nogui. Native memory consumed by JVM vs java process total memory usage. Ran The server. Support 4 x DP2. On the other server with 6. Run the game with the bat. -Xmx20G Smaller of 1/4th of the physical memory or 1GB. I have 300000 documents stored in solr index. e. The Xmx switch works with bytes, not fractions. I know its a silly discussion but, I found this on a thread "Go to SteamsteamappscommonProjectZomboid Edit the ProjectZomboid64. As you can see it should preallocate 2GB of heap and max out at 3GB (why we preallocate so much is because this app is ancient and poorly designed so has a ton of things to load up). I know its a silly discussion but, I found this on a thread "Go to Steam\\steamapps\\common\\ProjectZomboid Edit the ProjectZomboid64. I know its a silly discussion but, I found this on a thread "Go to SteamsteamappscommonProjectZomboid Edit the ProjectZomboid64. 4256255, WORKAROUND:Modify the server. As @Matt has mentioned, this is a generic solution. ATLauncher has two. Note:The limit for -XmX is -Xmx1500m on 32 bit windows. The flag Xmx specifies the maximum memory allocation pool for a Java Virtual Machine (JVM), while Xms specifies the initial memory allocation pool. 0 Backwards Compatibility 4GB of GDDR6 112 GB/s 64-bit 4x DP2. However, this has some frequently unexpected ramifications. It should look somehow like this: Is there a way to do this? Any plans. x. Also, the -Xms value can be used as “minimum heap size” to set a fixed heap size by setting -Xms = -Xmx when,. Windows XP will not let you have more than 3Gb of RAM ( doesn't care if you have 4Gb physical, ever since XP SP3) Vista may be different YMMV. Comando para o java: no lugar de [ram] coloque o quanto de ram quer pro servidor em MB. 4 GB. additional` properties in this file. # For example, to set the maximum to 3GB: -Xmx3G. If -Xms and -Xmx are the same value, then the JVM's heap size will stay constant at that value. This. Due to various additional constraints such as available swap, kernel address space usage, memory fragmentation, and VM overhead, in practice the limit can be much lower. -Xmx<ammount of memory>. bat Change the -Xms - Xmx to -Xms4gG -Xmx4G for example to set the ram to 4 GB. If you are going to use JVM arguments to define the memory allocation, be sure that you are not providing duplicate commands. 000027693802 today, which is a 1. 1. It is also possible to set the heap size via an environment variable. Forge. Select the Installations tab at the top of the Minecraft Launcher. CMS and Parallel GC consumes high CPU-Need Help. Thanks for the quick answer, ok got it, the orange part show the -Xms and only the -Xmx was increased. When I add the following to the jvm. Select “Edit” from the drop-down menu. You can also edit the "ProjectZomboid64. If you're dual-using a desktop to play minecraft and host a server, you need to add the allocated memory for the client and the server together, and use that as your value towards the 80% value. Then add the amount of RAM you would like to the JVM Arguments text box. Do not set -Xmx / -Xms. "4G" = 4GB of RAM allocated) Attention: 32-bit system only supports up to 4GB RAM memory. It's clearly documented here, I may just quote it here. And yes, xmx should be 4GB. Dentro de los sistemas digitales, la unidad básica de capacidad de información es el byte, el cual corresponde a 8 bits agrupados. You know what they say about too many chefs!Comment actions. gg/AtlasFollow. 99 –"Invalid maximum heap size"? "Could not reserve enough space"?There's a really simple fix. Correct: java -Xmx1024m -jar JavaApplication. Typically, there is a script of some form that has a java invocation in it. 4GB = -Xmx4096M -Xms4096M 5GB = -Xmx5120M -Xms5120M 6GB = -Xmx6144M -Xms6144M 8GB = -Xmx8192M -Xms8192M Note: Never try to give. 32-bit really boils down to the size of object references, not the size of numbers. I'm sorry I can't provide specifics to the mods you use, as I mainly administer bukkit servers, but allowing the server to use more RAM if it needs to can help. JOB A (JVM -Xmx Memory 4GB)-- Calls Child Job B (will inherit -Xmx from Job A and will initiate with 4 GB RAM)-- Calls Child Job C (will inherit -Xmx from Job A and will initiate with 4 GB RAM) If Child Job B & C are being executed in Parallel, then your system needs 12 GB RAM, else your child job cannot start. Elasticsearch latest version (8. So for around 2GB of memory, put 2048. Do not set -Xmx / -Xms. Claro que não vamos passar por todos esses argumentos, mas que tal focarmos em alguns que são realmente importantes para o seu dia a dia. To configure the heap size, add the Xms and Xmx JVM arguments to a custom JVM options file with the extension . You can also edit the "ProjectZomboid64. Share. The live XMax price today is $0. You can also edit the "ProjectZomboid64. I believe Purpur is useful for survival servers due to its extra configuration options. e the same Xmx available to other user). 3. We currently have everything set up to stay within our 1GB guaranteed RAM, but it seems as. On a Redhat CentOS 6. . 5 GB between the XMX and the 4GB k8s limit. Minecraft Realms: RAM Allocation Is Automatic If you are using Minecraft Realms, the official Mojang server host, you can't adjust your RAM allocation---and you don't need to. You're just asking for more problems. 15 will not do well with such low memory…) java -Xms10G -Xmx10G -XX:+UseG1GC -XX:+ParallelRefProcEnabled . bat add set JAVA_OPTS=-Xms128m -Xmx1024m after setlocal. You can also user a profiler tool such as Eclipse MAT to see exactly what objects cause the memory to be full. 128MB (4) = 512MB. If your JVM is 32bit, then heap size should be lower than 4gb.