serve icon indicating copy to clipboard operation
serve copied to clipboard

On running server, workers die

Open fbbradheintz opened this issue 6 years ago • 5 comments

I finally got the server to start, but when I do, I see a lot of this kind of thrash:

2019-12-19 12:01:32,130 [DEBUG] W-9006-densenet161 org.pytorch.serve.wlm.WorkerThread - Backend worker monitoring thread interrupted or backend worker process died.
java.lang.InterruptedException
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2088)
	at java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:418)
	at org.pytorch.serve.wlm.WorkerThread.run(WorkerThread.java:128)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
2019-12-19 12:01:32,130 [WARN ] W-9006-densenet161 org.pytorch.serve.wlm.BatchAggregator - Load model failed: densenet161, error: Worker died.
2019-12-19 12:01:32,130 [DEBUG] W-9006-densenet161 org.pytorch.serve.wlm.WorkerThread - W-9006-densenet161 State change WORKER_STARTED -> WORKER_STOPPED
2019-12-19 12:01:32,131 [INFO ] W-9006-densenet161 org.pytorch.serve.wlm.WorkerThread - Retry worker: 9006 in 55 seconds.

Java 1.8.0 Python 3.6.9 macOS 10.14.6

fbbradheintz avatar Dec 19 '19 20:12 fbbradheintz

Attempting to send input to the model, of course, fails while things are in this state.

fbbradheintz avatar Dec 19 '19 20:12 fbbradheintz

This may be an defect in the model file provided as part of the quick start instructions. Prior to the exception above, I see an error that claims Unexpected key(s) in state_dict for the model.

fbbradheintz avatar Dec 19 '19 20:12 fbbradheintz

Switching to resnet18 works. The model file for densenet161 is either defective or mismatched with the state dictionary downloaded in the quick start instructions.

fbbradheintz avatar Dec 19 '19 20:12 fbbradheintz

Fixed model.py for densenet161 example. @fbbradheintz could you please verify this with the latest pull?

harshbafna avatar Dec 21 '19 11:12 harshbafna

This has cleared up for me. Closing.

fbbradheintz avatar Jan 28 '20 23:01 fbbradheintz