diff --git a/odoo/http.py b/odoo/http.py index 79e6bd085f7b1..16f46e8b7a2ba 100644 --- a/odoo/http.py +++ b/odoo/http.py @@ -2251,6 +2251,7 @@ def fake_start_response(status, headers): request._post_init() current_thread.url = httprequest.url + _logger.info("CONNX ReQuEsT %s - %s - %s - %s - %s", environ.get("REQUEST_METHOD"), environ.get("REQUEST_URI"), environ.get("HTTP_USER_AGENT"), environ.get("HTTP_REFERER"), environ.get("REMOTE_ADDR")) if self.get_static_file(httprequest.path): response = request._serve_static() elif request.db: diff --git a/odoo/sql_db.py b/odoo/sql_db.py index 09f497f81ecda..edc93500c98c9 100644 --- a/odoo/sql_db.py +++ b/odoo/sql_db.py @@ -649,6 +649,12 @@ def borrow(self, connection_info): self._connections.append((cnx, False)) _logger.info('%r: Free leaked connection to %r', self, cnx.dsn) + _logger.info( + "CONNX %s connections (thread=%s, type=%s)", + len(self._connections), + str(threading.current_thread().ident), + str(getattr(threading.current_thread(), 'type', None)), + ) for i, (cnx, used) in enumerate(self._connections): if not used and self._dsn_equals(cnx.dsn, connection_info): try: