clip-as-service
clip-as-service copied to clipboard
Server hangs on termination from v1.8.7
Prerequisites
Please fill in by replacing
[ ]
with[x]
.
- [x] Are you running the latest
bert-as-service
? - [x] Did you follow the installation and the usage instructions in
README.md
? - [x] Did you check the FAQ list in
README.md
? - [x] Did you perform a cursory search on existing issues?
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
- TensorFlow installed from (source or binary): binary
- TensorFlow version: 1.13.1
- Python version: 3.6.8
-
bert-as-service
version: 1.8.9 - GPU model and memory: GTX 1080
- CPU model and memory: i7-7700k
Description
Upgrading from v1.8.6 to v1.8.9, I experienced that the server does not terminate when I run bert-serving-terminate
script. Specifically, the hang occurs in the _send_close_signal
method.
In v1.8.6, when I run bert-serving-terminate
script, the log message says:
I:SINK:[__i:clo:253]:shutting down...
I:SINK:[__i:clo:257]:terminated!
I:WORKER-0:[__i:clo:443]:shutting down...
I:WORKER-0:[__i:clo:447]:terminated!
I:VENTILATOR:[__i:_ru:199]:terminated!
In v1.8.9 it is changed as below:
I:SINK:[__i:clo:271]:shutting down...
I:SINK:[__i:clo:276]:terminated!
I:WORKER-0:[__i:clo:464]:shutting down...
I:WORKER-0:[__i:clo:469]:terminated!
I:VENTILATOR:[__i:_ru:216]:terminated!
I:VENTILATOR:[__i:clo: 88]:shutting down...
**HERE HANG OCCURS**
After testing on various versions, it occurs since v1.8.7, so I suspect that adding context manager to the BertServer
is the source of the problem.
I will keep inspecting and update findings.
I found the hang arises due to the call of BertServer.close
, regardless of the version (at least the problem also persists in v1.8.6, v1.8.0, v1.7.0).
Also, Ctrl-C
-ing the server terminates the process without issue.
Hi @jihunchoi : do you have any updates on this? I want to use the server in a programmatic way and therefore it would be nice to be able to kill it properly when done.
This happens in version v1.10.0. Has anyone solved it?