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
Dear Colleagues, When we click on Help ->Create Support Message . Create Message screen appears, in this screen we can select the Priorities. I wanted to know where we define these priorities. Is it in Satellite System(R/3 ) or in Solution manager. A [More]
Dear All, May i know how to change the status of a production order.I want to de-active the status like OPGN (Operation generated).This status is updated as there was no routing assigned to that particular production order during its creation Thanks [More]
I have an intel based iMac and am running Windows 7 on bootcamp. I use the bootcamp partition more than the Mac. I hooked up some external speakers to the iMac and they function fine when running the Mac OS but they don't work when running Windows 7. [More]
Dear accomplished Tuxedians, I'm trying to educate myself on Tuxedo 8.1 on Windows XP SP2, and so far so good. However, I've struck a question that the docs cannot answer. I've been able to run the simpapp application, and wondered how I could setup [More]
I have forgot my security answers but when I've done my apple ID I didn't choose one recuperation email, so how I can change my answers to buy in the apple store?You need to contact Apple to get the questions reset. Click here, phone them, and ask fo [More]
Hi,  Has anyone tried to run an Air 2.7 application on a 3rd Generation iPod Touch?  The requirements seems to have changed between Air 2.6 and 2.7.  Thanks,  /AndreasThere are different mistakes on different pages. For example, did you know that AIR [More]
Hotdesking between Sun Ray DTUs gives me a black screen and the mouse pointer. My environment is as follows: SRSS 4.2 in kiosk mode using uttsc SRWC 2.2 Windows 2003 R2 Terminal Server Observations Hotdesking to the same DTU works (so pulling and re- [More]
Hi all I have an issue while changing/Creating  journal wizard from BPC ADMIN, getting  " STRUCTURE  CHANGE NOT ALLOWED" when selecting an dimenion to be on header level information. current WEB Parameters: ALLOW_STRUCTURE CHANGES - YES  for giv [More]
I tried to install EBS, the apps check and found some errors that I need to fix before it can proceed. I tried to fix everything, re-run the installation and now I always got message: "No install actions have been found for this machine. Continue on [More]
Hi I am putting together an MSS role for Personal Assistants of managers....ie instead of using chief positions as standard I'm creating new OADP entries and assigning them to iViews (eg attendanceoverview)....all good until I came to the Team Calend [More]