Sitemap

Amicuk Programming Answers

Increasing memory used by java process when calling Runtime.exec()

-0001-11-30   Views:1

Advertisement

Hi everyone! I'm running a servlet Oracle iAS 9i, Jserv. It receives an image posted by a user and does a System.exec() which performs a call to convert (an image processing utility included in ImageMagick). After a few hours, java process start taki

Hi everyone!
I'm running a servlet Oracle iAS 9i, Jserv. It receives an image posted by a user and does a System.exec() which performs a call to convert (an image processing utility included in ImageMagick).
After a few hours, java process start taking more and more RAM, until it crashes with an error like this:
Memory: 5394008 free of 134217728 total. (I log this myself)
Exception: java.io.IOException: Not enough space
java.lang.UNIXProcess.forkAndExec(), line -2.
java.lang.UNIXProcess.<init>(), line 54.
java.lang.Runtime.execInternal(), line -2.
java.lang.Runtime.exec(), line 553.
ImageProcessor.convert(), line 235.
ImageProcessor.createItemPics(), line 124.
Uploader.doPost(), line 69.
As you can see, this is not an OutOfMemoryError, but something else in connection with O/S.
This is not related to hard disk space, since there is a lot of free space in every filesystems
After restarting the webserver, everything goes back to normal and start increasing RAM again.
Is there anything I can do? Any help will be gratly appreciated... Thanks!!!
Dani.-

The replay answer
Advertisement
Have you had any solutions to this pal?
I am also suffering. I tried closing the processes by:
Runtime runtime = Runtime.getRuntime();
Process proc = runtime.exec("/opt/sta_rpms.sh " + sFileName);
proc.waitFor();
proc.getInputStream().close();
proc.getOutputStream().close();
proc.getErrorStream().close();
proc.destroy();
proc = null;
but still after like a day...Though our codes are not alike, it sounds like the same reason.
Cheers!

Go to See the other 2 answers

Increasing memory used by java process when calling Runtime.exec()

Category:DefaultRelease time:-0001-11-30Views:130

Hi everyone! I'm running a servlet Oracle iAS 9i, Jserv. It receives an image posted by a user and does a System.exec() which performs a call to convert (an image processing utility included in ImageMagick). After a few hours, java process start taki[More]

Environment of process created by Runtime.exec()

Category:DefaultRelease time:-0001-11-30Views:130

Can anyone describe the interactions of the process environment created by Runtime.exec()? For example, if Runtime.exec() is used as follows: Runtime.exec("cmd /K somebatfile"); Is the environment preserved throughout the execution of somebatfil[More]

Executing DLLs from Java using JNI vs Runtime.exec()

Category:DefaultRelease time:-0001-11-30Views:130

I am trying to understand the best way to execute a dll using java. The dll I am testing with takes a few input parameter. If I use JNI with System.loadLibrary("dll"); what do I need to do to pass the arguements in as well? Can I just add the ar[More]

Process communication and runtime.exec()

Category:DefaultRelease time:-0001-11-30Views:130

I need to create a java class that interacts with a non-java application. The non-java application is a spell checking program which reads a misspelling from stdin and writes a list of suggestions to stdout. I want a java class that will act as a gat[More]

Problems with Runtime.exec() and certain Unix processes

Category:DefaultRelease time:-0001-11-30Views:130

Certain Unix processes don't behave correctly when run from Java using Runtime.exec(). This can be seen by running /bin/sh and trying to interact with it interactively. The issue appears to be that /bin/sh (and many other Unix tools) are checking the[More]

Memory space using a 32bit Java process on Redhat Linux

Category:DefaultRelease time:-0001-11-30Views:130

I have a java process that I need a lot of memory for. Its a 32 bit process, and I have no desire to have it as 64bit due to the huge pointers it forces. So I know I can turn to Solaris where I will have close to 4GB of memory available for this proc[More]

How to check actual allocated and used memory for java process in solaris?

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I'm testing performance for java application on solaris 10. And I would like to know how to measure actual memory allocated and used for java process. I'm setting -Xms512m -Xmx512m for my java process and I use prstat command to monitor it's memo[More]

SC3.1/2xV40z: java process eating memory

Category:DefaultRelease time:-0001-11-30Views:130

I've got a 2-node Cluster (SC 3.1) on Solaris 10x86 606 running. Uptime is about 171 days. noticed a java process allocating about 1.3 GB of RAM. This happens only on one node. The other one shows max. 256 MB allocated by a particular java processes.[More]

Can any java process exceed the maximum memory allocated

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I have a basic question on the memory settings. Assume I have a java process where the memory settings are like: -Xmx1024m where the server capacity is say 8GB Then can the process exceed the allocated memory of 1GB and go further say upto 4 GB.[More]

Weblogic java process slowly hogging memory

Category:DefaultRelease time:-0001-11-30Views:130

My unix 'top' utility tells me that my Weblogic java process is slowly hogging memory, over a period of hours under heavy load, until the machine finally starts swapping and performance goes into the toilet. I got a copy of jprobe, which I had hoped[More]

CreateRow increases memory and cpu. Tomcat+ADF Faces+BC4J in JDev 10.1.3.0

Category:DefaultRelease time:2015-10-11Views:130

CreateRow increases memory and cpu. Tomcat+ADF Faces+BC4J in JDev 10.1.3.0.4 My old problem is this Ineffectiveness/Inconsistency BC4J createrow in tomcat, CPU = 100%,Mem=2.2G I have tested my Adf Faces application with jmx in server and, in my machi[More]

Hot
Hi Friends, I am installing OEM for the 1st time in my org. I am getting the below error .Can someone help me here with some hints? Problems i am facing: 1. Of the 4 options avaiable for installing in oracle GUI only the last one(Additional Managemen [More]
I had Snow Leopard installed on my iMac and all software updates were current.  10.6.8 was installed and everything was ok.  It started randomly freezing a few weeks ago (I think it was actually after I did the last software update but I can't confir [More]
Hey I am Brian, and I was wondering how Lightroom mobile works again as in when importing photos directly into iPad using the camera connection kit.? This is for IPad 2.  I . Like when importing raw files. now I just did a photo shoot. and I just upl [More]
Hello all, We are trying to develop excel basic functionalities in Flex. first of all I just want to know if someone heard about code examples that implement basic excel functions in flex advanced/datagrid , such as : drag and drop (but not to other [More]
Hi,     I am doing scenario R3 (Rfc) - > XI - >SOAP(Webservice). Now R3 system is not available, i want to test the data flow between the XI and SOAP(WebService). I have tested  <b>Webservice</b> with XML Spy , witch is working fine. Now [More]
What are its uses and why do we need it.. if other tools like Dashboard and crystal reports and Webi can connect to universe and create reports and Analytics...Hello  Rajsan Madhavarajan   Query as a Web Service (QaaWS) is a SAP Business Objects (BOB [More]
I am trying to access a friend's macbook using ARD 3.3. I can find the machine's IP over the internet but cannot access it. Under the info pane it says the the client software on the remote machine is too old, so I created an installer package to get [More]
I'm in trouble trying to communicate a raw USB device trough VISA and CVI. I can easily connect and disconnect the device by using viOpen/viClose, but I don't know how to read/write data. Some functions like viWrite return this error: "Unable to star [More]
Hi team, I transferred my apple id to new Iphone and would like to purchase on apple store. I did recharge of $70 on my apple id, however i could not use it as the apple id required for verify security question. I forgot an answer for these questions [More]
Hello, I've been experiencing problems with my N91 e.g. the phone resets when the network mode is set to "Dual mode" and I move into an area that has 3G coverage. It will also reset if the person on the other end of a call hangs up just before I [More]