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
With Java 1.4.2: What is the correct way to format output in the java.io.PrintStream? The following is incorrect, even though it is still used in the The JavaTM Tutorial at: http://java.sun.com/docs/books/tutorial/essential/ System.out.formatThis ret [More]
I have a need to combine images and documents into a single PDF. Using automator, I am able to make an application that combines selected images in the finder into a pdf, but it doesn't work on text documents. So, I found this application that adds a [More]
I've built a dynamic order form with three product options listed as radio buttons. The three options are "Contoured" "Standard" and "Custom". "Contoured" requires five subfields to be filled in if it is selected. & [More]
Hi guys, first post so please be gentle. I have a MBA with iPhoto 11 and iMovie 11 runnion Lion,  I made a movie with video clips and some photos and all was working fine,  photos imported from their event folder in iPhoto.  Now today i decide to add [More]
Hi, I posted this once before but I've just read on some other posts that .dll files are the problem with some other issues. Is it possible I have a corrupted .dll file that is not letting podcasts update? I've tried uninstalling, re-installing and e [More]
Hello All, We had an user which was recreated and the old user ID was deleted. But the old userID had some open confirmations in it. We have changed the GUID of the old user with the new user GUID. So though we can view all shopping carts for the use [More]
Hi, Just bought a 2nd hand iPhone4 but can't upgrade to iOS6. Phone details are;      Version: 5.1.1 (9B208)          Model: MC605X      Modem Firmware: 04.12.01 iTunes 10.6.3.25 on Windows 7 returns the following error when trying to update;      - [More]
due to my computer crashing I lost a lot of my itunes library.  I have more music on my ipod than my secondary laptop which also has itunes but only about 60% of my library and ipod.  Can I add my new music to my ipod and manage playlists from the ip [More]
explain its purpose.Consists of one or more [RF] QAM channels. Uniquely identified by MPEG PID field (2-bytes) Information is conveyed to WCM by WDCD (Wideband Downstream Channel Descriptor) WDCD is transmitted every 2 seconds WDCD is transmitted on [More]
My iPhone 4S registers 3G data traffic even if all the apps are closed: whenever I'm not under wi-fi I see the 3G icon lighted up whenever I go trough set icon, or calendar or message device...even if all these utilities doesn't require 3G data. If I [More]