RE: java.lang.OutOfMemoryError
Just wondering but are you allocating any of that GB to orion or are you letting the box allocate the memory itself? I think that the box gives a default amount of memory to java and so that could be the reason you are running out of memory You can allocate by giving param setting on the startup script. ie your start up could look something like java -jar -Xms250M -Xmx500M orion.jar the -Xms is the min amount of memory the machine must allocate. the -Xmx is the max amount of memory the machine can take. Hope it helps j John Creaner Software Development, e-Spatial Solutions, Ireland. Tel: 353 (0)1 867 5500 Fax: 353 (0)1 867 5599 Direct Tel: 353 (0)1 867 5508 [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of mars Sent: 12 March 2002 07:16 To: Orion-Interest Subject: java.lang.OutOfMemoryError Dear orion user : I got a problem I have a Orion Appcation Server Run on Linux run the http service and https service then after a few hours I got the message in server.log *-- java.lang.OutOfMemoryError no stack trace available *-- and the https service down but http service still running is the memory low to use or any possable cause? !!!my server have 1GB Ram!!!
Re: java.lang.OutOfMemoryError
Be sure of cleaning all your ejbs when you remove them. Set all attributes and global variables to null. We have had a very similar problem, and this was one of the reasons. mars wrote: Dear orion user : I got a problem I have a Orion Appcation Server Run on Linux run the http service and https service then after a few hours I got the message in server.log *-- java.lang.OutOfMemoryError no stack trace available *-- and the https service down but http service still running is the memory low to use or any possable cause? !!!my server have 1GB Ram!!! -- ·· Juan Fuentes Nieto Essi Projects [EMAIL PROTECTED]t +34 977 221 182 http://www.essiprojects.com f +34 977 230 170 ··
RE: java.lang.OutOfMemoryError
The amount of memory in the box won't make much difference if the VM is not configured to use it...It's default settings are rather low, you'll need to check the startup script to see how much stack space it's putting aside...this is also related to performance issues as the VM will take longer to load with a large initial stack, but run more smoothly because it's not stopping to increase the size of the stack... Not sure about the other problem though. Shane -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of mars Sent: Tuesday, 12 March 2002 06:16 pm To: Orion-Interest Subject: java.lang.OutOfMemoryError Dear orion user : I got a problem I have a Orion Appcation Server Run on Linux run the http service and https service then after a few hours I got the message in server.log *-- java.lang.OutOfMemoryError no stack trace available *-- and the https service down but http service still running is the memory low to use or any possable cause? !!!my server have 1GB Ram!!!
RE: java.lang.OutOfMemoryError
You are probably running the server on the jdk JVM which is VERY limited on memory. You can up it with a -Xmx param when you are firing it up from the command line but most likely you need to use the JRE. Try changing your path to be /usr/opt/java122/jre/bin rather than /usr/opt/java122/bin. Also depending on the JVM you will probably want to run with the -server mode on. An example of this, is I ran tomcat once on a shiny new Compaq Alpha server with 4 gigs of ram 2 processors and a NetAppliance filer. (suite machine) In a demo I had six people bang away on the site and the threads killed the machine. I was getting nasty memory errors and it just quit. I realized that the JVM of the JDK on Tru64 Unix allocates 16M of memory while the fast64 JVM of the JRE on Tru64 Unix can use up to 70% of memory without changing any settings. (whoops) If that doesn't work then check to see if you are holding resources open. -d -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of mars Sent: Monday, March 11, 2002 11:16 PM To: Orion-Interest Subject: java.lang.OutOfMemoryError Dear orion user : I got a problem I have a Orion Appcation Server Run on Linux run the http service and https service then after a few hours I got the message in server.log *-- java.lang.OutOfMemoryError no stack trace available *-- and the https service down but http service still running is the memory low to use or any possable cause? !!!my server have 1GB Ram!!!
Re: java.lang.OutOfMemoryError;
instead of typing java -jar orion.jar at the command line to start orion, you could experiment with java -Xms128m -Xmx256m -jar orion.jar This increases the heap size. The 128 is the initial size, the 256 is the maximum size. The first number could be something like current free memory, and the second one could be something like total memory. - Original Message - From: Puthezhath, Rajeev (TWII Boston) [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Friday, June 08, 2001 11:28 PM Subject: RE: java.lang.OutOfMemoryError; Sorry.I didnt get what you meant.could you please explain Thanks Rajeev -Original Message- From: Juan Lorandi (Chile) [mailto:[EMAIL PROTECTED]] Sent: Friday, June 08, 2001 4:26 PM To: Orion-Interest Subject: RE: java.lang.OutOfMemoryError; inline -Original Message- From: Puthezhath, Rajeev (TWII Boston) [mailto:[EMAIL PROTECTED]] Sent: Viernes, 08 de Junio de 2001 14:42 To: Orion-Interest Subject: java.lang.OutOfMemoryError; Hi , We get java.lang.OutOfMemoryError; on production server frequetly.I know this problem was discussed in this list before. I implemented all the sugestions in this mailing list but still the error keeps on coming .I would like to know the following 1) As an answer to the above mentioned problem I saw a sugestion in this mailing list to limit the # of instances by adding max-instances attribute to orion-ejb-jar.xml which would force orion to passivate less used beans.I downloaded orion 1.5.2 and set the same.But observed that passivation is never called. Is there a way to make sure that orion passivates beans which are not used . 2) Some people have mentioned increasing the memory. Has any body tried this solution and i would like to know whether the problem got solved.How can I increase the memory ? first, by hardware (buy some chips), secondly, by specifying a minimun/maximun heap size of the JVM when you invoke it these are the ones I use (W2K, Sun's JVM 1.3.0) -Xms128m (minimun heap size 128 MB) -Xmx320m (maximun heap size 320 MB) 3)Has anybody solved this problem ? No. There´s always a limit to the amount of memory available on any given system ;-) Let's hope that(buggy orion code) gets fixed soon- don't forget to cast your vote on Bugzilla, that is, if vote casting is finally enabled Any sugestions Thanks in advance Regards Rajeev
RE: java.lang.OutOfMemoryError;
inline -Original Message- From: Puthezhath, Rajeev (TWII Boston) [mailto:[EMAIL PROTECTED]] Sent: Viernes, 08 de Junio de 2001 14:42 To: Orion-Interest Subject: java.lang.OutOfMemoryError; Hi , We get java.lang.OutOfMemoryError; on production server frequetly.I know this problem was discussed in this list before. I implemented all the sugestions in this mailing list but still the error keeps on coming .I would like to know the following 1) As an answer to the above mentioned problem I saw a sugestion in this mailing list to limit the # of instances by adding max-instances attribute to orion-ejb-jar.xml which would force orion to passivate less used beans.I downloaded orion 1.5.2 and set the same.But observed that passivation is never called. Is there a way to make sure that orion passivates beans which are not used . 2) Some people have mentioned increasing the memory. Has any body tried this solution and i would like to know whether the problem got solved.How can I increase the memory ? first, by hardware (buy some chips), secondly, by specifying a minimun/maximun heap size of the JVM when you invoke it these are the ones I use (W2K, Sun's JVM 1.3.0) -Xms128m (minimun heap size 128 MB) -Xmx320m (maximun heap size 320 MB) 3)Has anybody solved this problem ? No. There´s always a limit to the amount of memory available on any given system ;-) Let's hope that(buggy orion code) gets fixed soon- don't forget to cast your vote on Bugzilla, that is, if vote casting is finally enabled Any sugestions Thanks in advance Regards Rajeev
RE: java.lang.OutOfMemoryError;
Sorry.I didnt get what you meant.could you please explain Thanks Rajeev -Original Message- From: Juan Lorandi (Chile) [mailto:[EMAIL PROTECTED]] Sent: Friday, June 08, 2001 4:26 PM To: Orion-Interest Subject: RE: java.lang.OutOfMemoryError; inline -Original Message- From: Puthezhath, Rajeev (TWII Boston) [mailto:[EMAIL PROTECTED]] Sent: Viernes, 08 de Junio de 2001 14:42 To: Orion-Interest Subject: java.lang.OutOfMemoryError; Hi , We get java.lang.OutOfMemoryError; on production server frequetly.I know this problem was discussed in this list before. I implemented all the sugestions in this mailing list but still the error keeps on coming .I would like to know the following 1) As an answer to the above mentioned problem I saw a sugestion in this mailing list to limit the # of instances by adding max-instances attribute to orion-ejb-jar.xml which would force orion to passivate less used beans.I downloaded orion 1.5.2 and set the same.But observed that passivation is never called. Is there a way to make sure that orion passivates beans which are not used . 2) Some people have mentioned increasing the memory. Has any body tried this solution and i would like to know whether the problem got solved.How can I increase the memory ? first, by hardware (buy some chips), secondly, by specifying a minimun/maximun heap size of the JVM when you invoke it these are the ones I use (W2K, Sun's JVM 1.3.0) -Xms128m (minimun heap size 128 MB) -Xmx320m (maximun heap size 320 MB) 3)Has anybody solved this problem ? No. There´s always a limit to the amount of memory available on any given system ;-) Let's hope that(buggy orion code) gets fixed soon- don't forget to cast your vote on Bugzilla, that is, if vote casting is finally enabled Any sugestions Thanks in advance Regards Rajeev
RE: java.lang.OutOfMemoryError
We found we could force passivation in the later orion builds - not sure exactly whch builds it works in, but its OK in 1.4.7. Create a directory called orion in the root of your ejb jar (i.e. as a sibling of your META-INF directory). In the orion folder, create a file orion-ejb-jar.xml (The easy way is to copy the one that was auto created on a previous deployment - look in the $ORION_ROOT\application-deployments and the correct sub-folder.) Edit the file so that there is a max-instances="100" attribute on each of the entity-deployment entities. Delete the previous deployment directory (otherwise the new file will not be copied over), and repackage/deploy. Seems to work for us. Kev -Original Message- From: theo van niekerk [mailto:[EMAIL PROTECTED]] Sent: 27 March 2001 15:31 To: Orion-Interest Subject: java.lang.OutOfMemoryError Hi there Orion is a great application server for small web apps. (We have deployed 2 small sites using orion with success). But the moment you start thinking of using it for bigger more serious apps it will always throw a java.lang.OutOfMemoryError The problem: Orion does not passivate EJB's. Attached an EAR file that will show this. How to deploy.. Change your server.xml file to include something like.. application name="orionTest" path="file://C:/work/oriontest.ear" / Start orion the normal way.. java -jar orion.jar Well, I don't know how to execute an external client that reference classes inside a jar that is inside an ear, but the following works fine.. Unjar/Unzip the EAR Unjar/Unzip the JARS (I've used the directory structures.. c:\work\oriontest c:\work\oriontest\test-ejb c:\work\oriontest\test-client and orion.jar is in.. c:\PRG\orion) execute.. c:\work\oriontest\test-client\test.cmd or cd to.. c:\work\oriontest and execute.. c:\java\jdk1.3\bin\java -cp .;test-client;test-ejb;c:\PRG\orion\orion.jar tests.TestClient 1 10 2000 PARAMS.. index of first bean to create = 1 create 10 beans refresh home reference every 2000 creations (thought it could make a difference) and after 6410 creations.. Created bean...6410 Exception in thread "main" java.lang.OutOfMemoryError at com.evermind.server.rmi.bb.invokeMethod(JAX) at com.evermind.server.rmi.a2.invoke(JAX) at com.evermind.server.rmi.a3.invoke(JAX) at __Proxy0.create(Unknown Source) at tests.TestClient.loopTest(TestClient.java:33) at tests.TestClient.main(TestClient.java:39) And about 7 seconds later on the server side.. a single bean gets passivated Good Luck
RE: java.lang.OutOfMemoryError
This is beacause Orion doesn't free unused beans you need to use the inactivity-timeout attribute in the orion-ejb-jar.xml file it serves to free unused beans : entity-deployment ... validity-timeout=2000 ... H. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of theo van niekerk Sent: mardi, 27. mars 2001 16:31 To: Orion-Interest Subject: java.lang.OutOfMemoryError Hi there Orion is a great application server for small web apps. (We have deployed 2 small sites using orion with success). But the moment you start thinking of using it for bigger more serious apps it will always throw a java.lang.OutOfMemoryError The problem: Orion does not passivate EJB's. Attached an EAR file that will show this. How to deploy.. Change your server.xml file to include something like.. application name="orionTest" path="file://C:/work/oriontest.ear" / Start orion the normal way.. java -jar orion.jar Well, I don't know how to execute an external client that reference classes inside a jar that is inside an ear, but the following works fine.. Unjar/Unzip the EAR Unjar/Unzip the JARS (I've used the directory structures.. c:\work\oriontest c:\work\oriontest\test-ejb c:\work\oriontest\test-client and orion.jar is in.. c:\PRG\orion) execute.. c:\work\oriontest\test-client\test.cmd or cd to.. c:\work\oriontest and execute.. c:\java\jdk1.3\bin\java -cp .;test-client;test-ejb;c:\PRG\orion\orion.jar tests.TestClient 1 10 2000 PARAMS.. index of first bean to create = 1 create 10 beans refresh home reference every 2000 creations (thought it could make a difference) and after 6410 creations.. Created bean...6410 Exception in thread "main" java.lang.OutOfMemoryError at com.evermind.server.rmi.bb.invokeMethod(JAX) at com.evermind.server.rmi.a2.invoke(JAX) at com.evermind.server.rmi.a3.invoke(JAX) at __Proxy0.create(Unknown Source) at tests.TestClient.loopTest(TestClient.java:33) at tests.TestClient.main(TestClient.java:39) And about 7 seconds later on the server side.. a single bean gets passivated Good Luck
RE: java.lang.OutOfMemoryError
When I looked at your client, I found that you have a loop that creates 100,000 instances of the EJB and have never free any. Thus, your client now has 100,000 EJB's that will not be passivated until you leave the for loop. This type of code will break most app servers. SnowWolf Wagner -Original Message- From: theo van niekerk [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 27, 2001 9:31 AM To: Orion-Interest Subject: java.lang.OutOfMemoryError Hi there Orion is a great application server for small web apps. (We have deployed 2 small sites using orion with success). But the moment you start thinking of using it for bigger more serious apps it will always throw a java.lang.OutOfMemoryError The problem: Orion does not passivate EJB's. Attached an EAR file that will show this. How to deploy.. Change your server.xml file to include something like.. application name="orionTest" path="file://C:/work/oriontest.ear" / Start orion the normal way.. java -jar orion.jar Well, I don't know how to execute an external client that reference classes inside a jar that is inside an ear, but the following works fine.. Unjar/Unzip the EAR Unjar/Unzip the JARS (I've used the directory structures.. c:\work\oriontest c:\work\oriontest\test-ejb c:\work\oriontest\test-client and orion.jar is in.. c:\PRG\orion) execute.. c:\work\oriontest\test-client\test.cmd or cd to.. c:\work\oriontest and execute.. c:\java\jdk1.3\bin\java -cp .;test-client;test-ejb;c:\PRG\orion\orion.jar tests.TestClient 1 10 2000 PARAMS.. index of first bean to create = 1 create 10 beans refresh home reference every 2000 creations (thought it could make a difference) and after 6410 creations.. Created bean...6410 Exception in thread "main" java.lang.OutOfMemoryError at com.evermind.server.rmi.bb.invokeMethod(JAX) at com.evermind.server.rmi.a2.invoke(JAX) at com.evermind.server.rmi.a3.invoke(JAX) at __Proxy0.create(Unknown Source) at tests.TestClient.loopTest(TestClient.java:33) at tests.TestClient.main(TestClient.java:39) And about 7 seconds later on the server side.. a single bean gets passivated Good Luck
Re: java.lang.OutOfMemoryError in Product Application
This is a known bug. A workaround was posted a while back. I have since moved to another company and dont have an installation of orion here so Im going from memory here. there should be some class in the orion API like com.evermind.Administrator which has a function flush() (static I believe) which flushes theentities from memory. Sven Globetrot Communications wrote: Could it be that Orion does not passivate entity beans, thus running out of virtual memory? I was able to restart the ProductClient and continue adding to the table. Does anybody know of a solution better than having to stop and restart? Thanks --- Globetrot Communications [EMAIL PROTECTED] wrote: I am populating a postgreSQL database with "Product" entity beans. I get a java.lang.OutOfMemeoryError After adding about 200K entries. Am I getting this error because all these entity beans stay in memory? Is there a work-around it besides increasing the -mx option value? How can one to create number of objects limited only by the disk-space? Thanks for your help. while (true) { // Create a new Product and narrow the reference. Product product = (Product)PortableRemoteObject.narrow(home.create(i), Product.class); name = "product"+i cost = i; product.setName(name); product.setPrice(cost); } Satish __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/ = __ 5.5 cents calls with 6-second billing no fees. Free toll-fre numbers. No other charges 4 cents Domestic calls with no fees: 5 cents per minute International calls also available http://globetrot.hypermart.net e-mail: [EMAIL PROTECTED] __ __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/
Re: java.lang.OutOfMemoryError in Product Application
As per the suggestion, I am doing the following in an attempt to flush the cache after every 10,000 object creation. Watching the "free memory", simultaneously, I was expecting this free memory-count to jump up every 10,000 objects - but, I am not seeing that. The "free memory" count is,gradually, creeping downwards, with occasional slight bump-ups. The application is still running and will croak tonight if this fix is not effective. In the meantime, could somebody please confirm if I have applied the fix correctly. "MyProduct" is the ejb-ref-name in the application-client.xml Thanks Context context = new InitialContext(); Object o = context.lookup("java:comp/Administrator"); ApplicationAdministrator admin = (ApplicationAdministrator) PortableRemoteObject.narrow(o,ApplicationAdministrator.class); . . . while (true) { // Create a new Product and narrow the reference. Product product = (Product)PortableRemoteObject. narrow(home.create(i), Product.class); name = "product"+i; cost = i; product.setName(name); product.setPrice(cost); if ((i%1)==0) { admin.flushEJBCache("MyProduct"); System.out.println(name +" added. Took " +((System.currentTimeMillis()-startTime)/1000+"secs")); } i++; } --- Globetrot Communications [EMAIL PROTECTED] wrote: Could it be that Orion does not passivate entity beans, thus running out of virtual memory? I was able to restart the ProductClient and continue adding to the table. Does anybody know of a solution better than having to stop and restart? Thanks --- Globetrot Communications [EMAIL PROTECTED] wrote: I am populating a postgreSQL database with "Product" entity beans. I get a java.lang.OutOfMemeoryError After adding about 200K entries. Am I getting this error because all these entity beans stay in memory? Is there a work-around it besides increasing the -mx option value? How can one to create number of objects limited only by the disk-space? Thanks for your help. while (true) { // Create a new Product and narrow the reference. Product product = (Product)PortableRemoteObject.narrow(home.create(i), Product.class); name = "product"+i cost = i; product.setName(name); product.setPrice(cost); } Satish __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/ = __ 5.5 cents calls with 6-second billing no fees. Free toll-fre numbers. No other charges 4 cents Domestic calls with no fees: 5 cents per minute International calls also available http://globetrot.hypermart.net e-mail: [EMAIL PROTECTED] __ __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/ __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/
Re: java.lang.OutOfMemoryError in Product Application
Hi Suresh, I am not having any problems, I was replying to someone else who was having an out of memory problem. I have not encountered any out of memory problems but I remembered sven posting something some time ago on the ApplicationAdministator, which i had saved, so I reposted it. Perhaps you could direct your expertise towards Satish, who posted; wrote: I am populating a postgreSQL database with "Product" entity beans. I get a java.lang.OutOfMemeoryError After adding about 200K entries. Am I getting this error because all these entity beans stay in memory? Is there a work-around it besides increasing the -mx option value? How can one to create number of objects limited only by the disk-space? Thanks for your help. while (true) { // Create a new Product and narrow the reference. Product product = (Product)PortableRemoteObject.narrow(home.create(i), Product.class); name = "product"+i cost = i; product.setName(name); product.setPrice(cost); } Satish Cheers, Brett
Re: java.lang.OutOfMemoryError in Product Application
If you search the mail archive for 'Admin Memory' you will find references to the ApplicationAdministator which can be used to flush the cache. I believe this was a work-around. I'm currently running my batchupdates with the earlier proposed workaround: import com.evermind.server.administration.*; snip Context context = new InitialContext(); Object o = context.lookup("java:comp/Administrator"); ApplicationAdministrator admin = (ApplicationAdministrator)javax.rmi.PortableRemoteObject.narrow(obj, ApplicationAdministrator.class); snip admin.flushEJBCache("name of your entity-bean"); snip This works perfectly. Only 1 entity bean instance gets created. CPU usage wich earlier was at 100% corrently stays around 53% and significantly less memory is used. sven Cheers, Brett
Re: java.lang.OutOfMemoryError in Product Application
Could it be that Orion does not passivate entity beans, thus running out of virtual memory? I was able to restart the ProductClient and continue adding to the table. Does anybody know of a solution better than having to stop and restart? Thanks --- Globetrot Communications [EMAIL PROTECTED] wrote: I am populating a postgreSQL database with "Product" entity beans. I get a java.lang.OutOfMemeoryError After adding about 200K entries. Am I getting this error because all these entity beans stay in memory? Is there a work-around it besides increasing the -mx option value? How can one to create number of objects limited only by the disk-space? Thanks for your help. while (true) { // Create a new Product and narrow the reference. Product product = (Product)PortableRemoteObject.narrow(home.create(i), Product.class); name = "product"+i cost = i; product.setName(name); product.setPrice(cost); } Satish __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/ = __ 5.5 cents calls with 6-second billing no fees. Free toll-fre numbers. No other charges 4 cents Domestic calls with no fees: 5 cents per minute International calls also available http://globetrot.hypermart.net e-mail: [EMAIL PROTECTED] __ __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/
Re: java.lang.OutOfMemoryError in Product Application
Hi Brett, In first place are using any tool provided by Orion like earassembler.jar or ejb-assembler.jar? If you are using it, these kind of problem will persist, this is what I have experienced. It keeps the Beans in cache, and any changes done to these will throw you OutOfMemoery error. U can solve this problem by two ways: 1) U can open the ear.jar, the zip file through winzip(unzip/zip tool) (don't extract), replace the files need to be changed and close. Initialize Orion, changeswill be taken w/o throwing the error. 2) Spend some time building the Build.xml, and runthe ant.bat. This will build a new ear each time u run ant. Both of the solutions r tested solutions, and works fine. the 2nd solution is universal, and a better solution. Suresh Ajja Java Developer www.verchaska.com mailto: [EMAIL PROTECTED] - Original Message - From: "Brett Lane" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Thursday, January 25, 2001 4:37 AM Subject: Re: java.lang.OutOfMemoryError in Product Application If you search the mail archive for 'Admin Memory' you will find references to the ApplicationAdministator which can be used to flush the cache. I believe this was a work-around. I'm currently running my batchupdates with the earlier proposed workaround: import com.evermind.server.administration.*; snip Context context = new InitialContext(); Object o = context.lookup("java:comp/Administrator"); ApplicationAdministrator admin = (ApplicationAdministrator)javax.rmi.PortableRemoteObject.narrow(obj, ApplicationAdministrator.class); snip admin.flushEJBCache("name of your entity-bean"); snip This works perfectly. Only 1 entity bean instance gets created. CPU usage wich earlier was at 100% corrently stays around 53% and significantly less memory is used. sven Cheers, Brett