Getting oom error while trying to convert docx to pdf via LibreOffice 5.3.7

Hi Everyone,

Have installed libreoffice 5.3.7 from https://build.opensuse.org/package/revisions/LibreOffice:5.3/libreoffice
using
JVM : OpenJDK8
Server : Tomcat
OS : SUSE
Libreoffice is started in a headless mode via the following command

soffice --headless --accept="socket,host=127.0.0.1,port=8100;urp;StarOffice.ServiceManager" 

Things look fine till then.

However, at the java layer I am using “Jodconverter api” to trigger the conversion of docx to pdf (trying to convert the docx to pdf via application rather than command line) - during this invocation I am running into oom issue, stack trace as mentioned below

ERROR [NioEndpoint]
java.lang.OutOfMemoryError: unable to create new native thread (498 threads running, rlimit: STACK 8192k, CORE 
infinity, NPROC 63945, NOFILE 65535, AS infinity, DATA infinity, CPU infinity, FSIZE infinity, MEMLOCK 64k , Memory: 4k 
page, physical 32808268k(14026696k free), swap 3129340k(3129340k free)  )
    at java.lang.Thread.start0(Native Method) ~[?:1.7.0_101]
    at java.lang.Thread.start(Thread.java:781) ~[?:1.7.0_101]

Basically I am invoking the OpenOfficeDocumentConverter - wrapped within a thread

class ThreadA {
void run(){
convertDOCToPDF();
}
void convertDOCToPDF(){
DocumentConverter docConverter = new OpenOfficeDocumentConverter(libreOfficeConnection);
    docConverter.convert(inFile, outFile);
}
}

class Jodconverter {
ThreadA a = new ThreadA();
 a.start(); --- > oom error is occuring at this point
 }

Am i doing something wrong, does libreoffice work well with OpenJDK or am i missing any configs , can someone please help.

Note : same code w.r.t OpenOffice 3.4.1 works well with no issues, only difference is openoffice is not making use of OpenJDK in my setup.