Weka max heap error or out of memory error solution for windows users
Hi friends!
I was facing this problem whenever I was testing a weka with a large chunk of data on a system running 2 GB RAM and windows 8.1. I looked through a lot of forums including stack overflow and I came to several broken pieces of puzzle which I summerized and found it to be forking in my case:-
1) go to the program folder in your C drive
2)make a search or locate Runweka.ini or Runweka.bat file(dont get spooked/freaked with file extension)
3)open the file in text editor(notepad!!)
4) you will see hashed(#) sentences, so for newbie, be informed that they are commented out parts of that file
5) Read through the text file,its not a big text file.... its basically a configuration file and if you even have lightly practised using Weka you will identify which parameters they are and also to determine that the parameter below is already added or not.Chances are it wont be
6) just press enter and create a new line and...
7) type "max.heap=2g"(ignore quotation while actually typing it); 2g represents 2 GB of RAM,use as per your system hardware config and need
Note- in stackoverflow i saw this parameter written as maxheap not max.heap.So, when i ran it as per stackoverflow forum comment. it didnt work out for me
8) Since, you may not have logged in as sysadmin on that system you wont be able to directly save the file in system drive so,use "save as" option and then overwrite the existing file with the updated version of the config file.
9) You may see some windows permission dialog box before overwriting the file inside weka folder under windows program files but dont worry
10) Dont keep your weka running while messing with its config file,restart your weka and test the same model where you were receiving maxheap error
11)This is the final one which I found it working - Go to the weka file in your program file folder of your C: Drive(if using windows OS,any version edition).....by using the CD command in terminal/command prompt and type the following in your command prompt,after you have moved inside the drive containing weka.jar file using change directory command -
java-Xmx1g-classpathweka.jar
this will open, the weka application and the command prompt will be running. The moment you close your weka application or that command prompt,using it you have asked weka to use more memory than default, memory allocation will go away. 1g=1 GB of RAM...
Best of luck guys!......ohhhh....... i almost forgot, if you face any other error you can post it here and start a chain of idea exchange here or replace the config file with an old one
I was facing this problem whenever I was testing a weka with a large chunk of data on a system running 2 GB RAM and windows 8.1. I looked through a lot of forums including stack overflow and I came to several broken pieces of puzzle which I summerized and found it to be forking in my case:-
1) go to the program folder in your C drive
2)make a search or locate Runweka.ini or Runweka.bat file(dont get spooked/freaked with file extension)
3)open the file in text editor(notepad!!)
4) you will see hashed(#) sentences, so for newbie, be informed that they are commented out parts of that file
5) Read through the text file,its not a big text file.... its basically a configuration file and if you even have lightly practised using Weka you will identify which parameters they are and also to determine that the parameter below is already added or not.Chances are it wont be
6) just press enter and create a new line and...
7) type "max.heap=2g"(ignore quotation while actually typing it); 2g represents 2 GB of RAM,use as per your system hardware config and need
Note- in stackoverflow i saw this parameter written as maxheap not max.heap.So, when i ran it as per stackoverflow forum comment. it didnt work out for me
8) Since, you may not have logged in as sysadmin on that system you wont be able to directly save the file in system drive so,use "save as" option and then overwrite the existing file with the updated version of the config file.
9) You may see some windows permission dialog box before overwriting the file inside weka folder under windows program files but dont worry
10) Dont keep your weka running while messing with its config file,restart your weka and test the same model where you were receiving maxheap error
11)This is the final one which I found it working - Go to the weka file in your program file folder of your C: Drive(if using windows OS,any version edition).....by using the CD command in terminal/command prompt and type the following in your command prompt,after you have moved inside the drive containing weka.jar file using change directory command -
java
this will open, the weka application and the command prompt will be running. The moment you close your weka application or that command prompt,using it you have asked weka to use more memory than default, memory allocation will go away. 1g=1 GB of RAM...
Best of luck guys!......ohhhh....... i almost forgot, if you face any other error you can post it here and start a chain of idea exchange here or replace the config file with an old one
Comments