Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

Create Process Paging File Errors with Runtime.getRuntime Windows     2003 Server

Thread view: 
javaman41@gmail.com - 16 Mar 2008 08:19 GMT
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?
Andrew Thompson - 16 Mar 2008 13:21 GMT
On Mar 16, 6:19 pm, javama...@gmail.com wrote:
> 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.  ;-)

--
Andrew T.
PhySci.org
Zig - 16 Mar 2008 21:42 GMT
> Has anyone run across this problem?
>
[quoted text clipped - 8 lines]
> 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
Nigel Wade - 17 Mar 2008 10:58 GMT
> Has anyone run across this problem?
>
[quoted text clipped - 3 lines]
>
> 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.

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.