Fwd: Reg - Sub Process creation from java takes more time

Manjunath SV manju.jccs at gmail.com
Thu Sep 15 06:36:51 UTC 2016


Hi All,

I am Manjunath, We are facing below issue in Java application.

Issue Details :-

Java application has a thread pool of size 30, When it receives Job message
 from JMS, It creates around 200+ jobs and submit into thread
pool,initially 30 threads creates shell script process very quick, later
process creation time gradually increases (5-9 mins).


Java application invokes shell script, Below is the code.

process = Runtime.getRuntime().exec(new String[] { script_name,
param1, param2, param3,param4 });

int response = process.waitFor();

Shell script :-

#!/bin/ksh
linux-command  -un $1 -pw $2  -f batch.txt < $3 > $4 2>&1

We redirected command output and errors to a file.

First job execution after application restart takes just 15 sec, later job
execution takes around 15 mins, some times 40 mins also.

We are using java 1.8.0_92.

Please advise on this.

Thanks in advance.

Regards,
Manjunath


More information about the core-libs-dev mailing list