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
My HP G60 came with Vista. It has been upgraded to Windows 8.1 but the audio function has become non-functional. Is there a need for a new driver to solve this issue? If not, I am thinking of restoring Vista from restore disks. Can the restore disks [More]
I'm new to Captivate and recorded a video demo for my co-workers instructing how to set up and run an Adobe Connect Meeting. We have an account to publish Adobe Presenter and Captivate content to Adobe Connect Pro, and use it to host our Adobe Presen [More]
Hi All here my java class trying to read a txt file(which is having size of 60MB).and putting each line into a Vector class. problem is ,upto certain number of line it is reading properly and putting into vector..after that it is giving error like Ex [More]
I have a tabular form in which I want a select list to auto submit. I have tried using OnChange but can't seem to get it to work. What would I need to change on this select list to get it to auto submit the tabular form for me? Thanks! Edited to add [More]
Hello all, For some reason my smpatch is broken and won't download patches. I need to locate Update 3 for Solaris 10 x86 but with all the new changes to the website I'm completely lost and can't seem to find the download link. Can anyone help out? Th [More]
Hi all, I was trying to create a snapshot in outlook in a users computer but unfortunately the system displays a strange message: Access to business partners denied.User "so and so" is not a sales employee The user is a member of Sales Employees [More]
I'm using Photoshop CS CC on the new Mac which looks like a rubbish bin, and keep receiving "Could not use the ***** because of a program error". Does anyone know a work around or fix as I can't work with photoshop.There seem to be recurring per [More]
My app update button does not bring up the progams to be update in itunes updateTry updating from here: App Store>Purchased>Select "All" Note: You'll have to look out for apps that have the word "Update"Read other 2 answers [More]
When I browse albums in iTunes in the "albums" view mode (cover art in grid format) and click on an album, the album is highlighted and an arrow appears to the far right of the highlighted album's title. This opens a menu which includes an " [More]
I am in the process of making a compilation disk of scanned snapshots for a friend's photoframe device.  I am importing to CS2 via Twain scans of four 4x6 snapshots at a time.  I rotate, crop, color correct, adjust brightness/contrast, touch up the i [More]