question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Object Detection worker dies

See original GitHub issue

I am deploying a FasterRCNN model with 2 workers, and when I POST an image to the inference API as follows:

curl -X POST http://localhost:8080/predictions/faster-rcnn -T image.png

The server responds with this error:

{
  "code": 507,
  "type": "InternalServerException",
  "message": "Worker died."
}

I first thought that this issue was related to memory usage, but I am increasing the Java VM memory by setting this options to the ts config file: vmargs=-Xmx12g and I am still getting this 507 error.

The server logs are:

2020-04-29 06:57:02,007 [INFO ] epollEventLoopGroup-4-2 org.pytorch.serve.wlm.WorkerThread - 9001 Worker disconnected. WORKER_MODEL_LOADED
2020-04-29 06:57:02,057 [DEBUG] W-9001-faster-rcnn_1.0 org.pytorch.serve.wlm.WorkerThread - Backend worker monitoring thread interrupted or backend worker process died.
java.lang.InterruptedException
        at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2056)
        at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2133)
        at java.base/java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:432)
        at org.pytorch.serve.wlm.WorkerThread.run(WorkerThread.java:128)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

Can someone help me?

Also I want to thank Pytorch team for this awesome work.

Environment details:

Log file: ts_log.log

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Guillem96commented, Apr 29, 2020

It Is not trained with coco I am using a custom dataset. Maybe the issue is related to Windows an Docker for windows.

I will try to run the code on a GCP compute engine with ubuntu and see what happens

1reaction
Guillem96commented, Apr 29, 2020

@harshbafna

Upload as txt because GitHub is not allowing .py

Model handler: handler.txt Model file: model.txt

Model archive command:

$ torch-model-archiver \
    --model-name faster_rcnn \
    --serialized-file faster_rcnn.pt \
    --handler handler.py \
    --model-file model.py

TS config file:

# Server properties
inference_address=http://0.0.0.0:8080
management_address=http://0.0.0.0:8081
job_queue_size=100

# Model archives location
load_models=all
default_workers_per_model=1
model_store=/image-asset-server/model-store

# Java VM arguments
vmargs=-Xmx12g
Read more comments on GitHub >

github_iconTop Results From Across the Web

Construction worker dies at Golden Gate Estates work site
A construction worker is dead after a wall fell on him in Golden Gate Estates ... The name and age of the man...
Read more >
FACEValue: Worker killed by material handler | 2016-04-25
A 47-year-old worker died after being struck by a hydraulic material handler. ... proximity warning systems or object detection systems.
Read more >
Construction Worker Dies After Falling Down Shaft at Palo Alto ...
A construction worker died after falling down a shaft at a building in downtown Palo Alto early Wednesday morning, according to police.
Read more >
A Construction Worker Died Today. . . Preventing the Five ...
More and more workers each year are falling victim to those incidents where they are “struck by” an object or construction equipment. According ......
Read more >
Warehouse Worker Crushed by Forks of Laser Guided Vehicle
In December 2015, a 45-year-old warehouse dock coordinator at a water bottling company died after he was crushed when the elevated forks of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found