Create Process Paging File Errors with Runtime.getRuntime Windows2003 Server

J

javaman41

Has anyone run across this problem?

When using

Process p=Runtime.getRuntime("program.exe");


On a large external process, you will get a Paging File Error.

It does not happen when the CreateProcess call (Runtime.getRuntime())
is calling an external process which has a short wait time, but when
the external process has a long wait time (processing large files),
the results give a paging file error.

I have tried running Runtime.getRuntime() in a separate thread and as
a method call (Yes I know it will launch a Windows thread anyway).
Driving me nuts, because it is doing this randomly on Windows 2003
Server.

Any ideas?
 
A

Andrew Thompson

Has anyone run across this problem?

Perhaps in 2003. Which in computer terms is like
'dog years' - that is, 1 for 7, which would make it..
'1973' as far as any current day programmer remembers.
Any ideas?

Use a current version of tomcat. It may not
fix the problem, but at least people might
care enough to investigate the root cause. ;-)
 
Z

Zig

Has anyone run across this problem?

When using

Process p=Runtime.getRuntime("program.exe");


On a large external process, you will get a Paging File Error.

It does not happen when the CreateProcess call (Runtime.getRuntime())
is calling an external process which has a short wait time, but when
the external process has a long wait time (processing large files),
the results give a paging file error.

Does "program.exe" (with the long wait time) work on the command line, or
when launched outside of your code? If not, you probably will not be able
to solve the problem within the VM.

Also, what do you mean by "the results give a paging file error"? Does the
VM crash? The launched process? Both? How much RAM does the process need?
Do you have enough while the VM is running? Does the error occur before
the process is launched, shortly after, or a noticeable while after?

Hhow much output does the program write to the console? Be sure you are
reading Process.getErrorStream() & Process.getInputStream() and keeping
those streams drained so the OS doesn't have to continuously buffer the
process output. You might be able to get away with calling

p.getErrorStream().close();
p.getInputStream().close();

But if something goes wrong, you've swallowed your best debugging
information, so this is probably best avoided.

HTH,

-Zig
 
N

Nigel Wade

Has anyone run across this problem?

When using

Process p=Runtime.getRuntime("program.exe");


On a large external process, you will get a Paging File Error.

The most likely reason for a Paging File Error is that you have exceeded the
maximum amount of virtual memory in the system. That is the sum of the virtual
memory requirements of all processes has exceeded the sum of the physical RAM
plus maximum paging file size.
It does not happen when the CreateProcess call (Runtime.getRuntime())
is calling an external process which has a short wait time, but when
the external process has a long wait time (processing large files),
the results give a paging file error.

I doubt very much that it has anything whatever to do with the "wait time", but
is entirely due to the "processing large files".
I have tried running Runtime.getRuntime() in a separate thread and as
a method call (Yes I know it will launch a Windows thread anyway).
Driving me nuts, because it is doing this randomly on Windows 2003
Server.

Any ideas?

Buy more RAM, increase the paging file size, or get a better OS.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top