BMDSoftware / neji

Flexible and powerful platform for biomedical information extraction from text
39 stars 23 forks source link

Cannot load model from web ui #14

Open afergadis opened 7 years ago

afergadis commented 7 years ago

Hi.

I am running the web service with ./nejiWeb.sh -t 4. The service starts and from the admin pages I created a services and loaded the two provided dictionaries. When I try to load a model, the service runs for about 20 minutes and then I get the following errors:

[INFO] Loading model...
Exception in thread "qtp1620948027-34" java.lang.OutOfMemoryError: Java heap space
Exception in thread "qtp1620948027-63" 
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "qtp1620948027-63"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "qtp1620948027-34"
Exception in thread "qtp1620948027-61" Exception in thread "qtp1620948027-64" Exception in thread "qtp1620948027-36" Exception in thread "qtp1620948027-33" Exception in thread "qtp1620948027-62" java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "qtp1620948027-66"

java.lang.OutOfMemoryError: Java heap space
Exception in thread "HashSessionScavenger-0" Exception in thread "qtp1620948027-35" java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
    at java.util.concurrent.ConcurrentHashMap$KeySetView.iterator(ConcurrentHashMap.java:4578)
    at org.eclipse.jetty.io.nio.SelectorManager$SelectSet$1.run(SelectorManager.java:638)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
    at java.lang.Thread.run(Thread.java:745)

I am using 1.8.0_77 java version

java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

My notebook has a Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz and 8GB RAM.

Can you help me run the service properly?

Thank you.


Update

Running/Debugging the WebMain class I get a java.lang.StackOverflow error. This is raised in the CRFBase class in line crf = (CRF) ois.readObject();

For some reason it looks like it cannot read the model.

davidcampos commented 7 years ago

@afergadis: You can try two things:

afergadis commented 7 years ago

Tried with -t 2 and 12G memory. Again loading a model failed.

pt.ua.tm.neji.exception.NejiException: There was a problem loading the CRF model.
    at pt.ua.tm.neji.train.model.CRFBase.load(CRFBase.java:214)
...
Caused by: java.io.StreamCorruptedException: unexpected EOF while reading block data header
    at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2526)
...
[ERROR] The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
java.lang.NullPointerException
    at pt.ua.tm.neji.web.server.Server.addModel(Server.java:527)
...
[WARN] /manage/addModel/
java.lang.NullPointerException
    at pt.ua.tm.neji.web.server.Server.addModel(Server.java:527)

If you want I can attach all the errors.

davidcampos commented 7 years ago

@afergadis Can you please post the complete command line? Which model are you using? Was it trained using the version o Neji that you are using right now?