Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot load model from web ui #14

Open
afergadis opened this issue May 24, 2017 · 3 comments
Open

Cannot load model from web ui #14

afergadis opened this issue May 24, 2017 · 3 comments

Comments

@afergadis
Copy link

afergadis commented May 24, 2017

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
Copy link
Contributor

davidcampos commented Jun 17, 2017

@afergadis:
You can try two things:

  • use a lower number of threads: ./nejiWeb.sh -t 2
  • try allocating more memory using the -Xmx option, editing the ./nejiWeb.sh script

@afergadis
Copy link
Author

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
Copy link
Contributor

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants