Paddle Serving CPU做FasterRCNN检测超时20秒
Created by: wangjiawei04
复现步骤
docker run --rm -dit --name pddet hub.baidubce.com/paddlepaddle/serving:0.2.0
docker exec -it pddet bash
yum install -y libXext libSM libXrender
pip install paddlepaddle paddle_serving_server paddle_serving_client opencv-python ujson -i https://pypi.tuna.tsinghua.edu.cn/simple
wget https://paddle-serving.bj.bcebos.com/pddet_demo/faster_rcnn_model.tar.gz
wget https://paddle-serving.bj.bcebos.com/pddet_demo/paddle_serving_app-0.0.1-py2-none-any.whl
pip install -U paddle_serving_app-0.0.1-py2-none-any.whl -i https://pypi.tuna.tsinghua.edu.cn/simple
tar xf faster_rcnn_model.tar.gz
cd faster_rcnn_model
GLOG_v=2 python -m paddle_serving_server.serve --model pddet_serving_model --port 9393
python test_client.py pddet_client_conf/serving_client_conf.prototxt cpp_demo.yml 000000570688.jpg
错误日志
客户端
W0410 05:31:08.978428 10701 predictor.hpp:129] inference call failed, message: [E1008]Reached timeout=20000ms @0.0.0.0:0
服务器端
我增加了输出Tensor的打印
multiclass_nms
为 size [96,6]
的 Tensor
log时间信息
I0410 05:30:49.026082 10691 op.cpp:158] general_reader_op_time=[3462]
I0410 05:31:40.752912 10691 op.cpp:158] general_infer_op_time=[51726798]
I0410 05:31:40.753150 10691 op.cpp:158] general_response_op_time=[106]
I0410 05:31:40.753165 10691 service.cpp:238] workflow total time: 51732726
I0410 05:31:40.754063 10691 general_model_service.pb.cc:2481] tc=[51738838]
W0410 05:31:40.754109 10691 baidu_rpc_protocol.cpp:256] Fail to write into fd=9 SocketId=113@127.0.0.1:51334@9393: Unknown error 1014 [1014]
因此可以确认 服务端预测本身 没有问题,但20秒超时限制太短。