Closed aixi88 closed 4 years ago
You do not do it explicitly - when you are done with a given connection, it will be returned to the pool automatically.
Thus, if you are seeing this exception it means that either your Odoo queries take too long or that you need to increase your pool size.
Also, please start to format tracebacks correctly. You have been opening tickets for a longer time and it really is difficult to read them without code formatting.
thank you! I'll pay attention to code formatting。
How to close odoo outgoing connection? thanks!
2020-05-05 06:00:00,364 - ^[[1;31mERROR^[[0m - 442:DummyThread-310 - zato.server.connection.queue:0 - No free connections to
connector
2020-05-05 06:00:00,364 - ^[[1;33mWARNING^[[0m - 442:DummyThread-310 - zato.server.service:0 - Traceback (most recent call last): File "/opt/zato/3.1.0/code/zato-server/src/zato/server/connection/queue.py", line 46, in enter self.client = self.queue.get(self.should_block, self.block_timeout) File "src/gevent/queue.py", line 329, in gevent._queue.Queue.get File "src/gevent/queue.py", line 344, in gevent._queue.Queue.get File "src/gevent/queue.py", line 313, in gevent._queue.Queue.__get_or_peek queue.EmptyDuring handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/zato/3.1.0/code/zato-server/src/zato/server/service/init.py", line 660, in update_handle self._invoke(service, channel) File "/opt/zato/3.1.0/code/zato-server/src/zato/server/service/init.py", line 547, in _invoke service.handle() File "/opt/zato/env/qs-1/work/hot-deploy/current/kd_connector.py", line 118, in handle with self.outgoing.odoo.get('connector').conn.client() as client: File "/opt/zato/3.1.0/code/zato-server/src/zato/server/connection/queue.py", line 51, in enter raise Exception(msg) Exception: No free connections to
connector