summaryrefslogtreecommitdiff
path: root/odoo/service
diff options
context:
space:
mode:
Diffstat (limited to 'odoo/service')
-rw-r--r--odoo/service/model.py1
-rw-r--r--odoo/service/server.py4
2 files changed, 4 insertions, 1 deletions
diff --git a/odoo/service/model.py b/odoo/service/model.py
index 9673b6f98c9..82a32c2cfc1 100644
--- a/odoo/service/model.py
+++ b/odoo/service/model.py
@@ -157,6 +157,7 @@ def check(f):
return wrapper
def execute_cr(cr, uid, obj, method, *args, **kw):
+ odoo.api.Environment.reset() # clean cache etc if we retry the same transaction
recs = odoo.api.Environment(cr, uid, {}).get(obj)
if recs is None:
raise UserError(_("Object %s doesn't exist") % obj)
diff --git a/odoo/service/server.py b/odoo/service/server.py
index 15d3009e36b..7ff35146a85 100644
--- a/odoo/service/server.py
+++ b/odoo/service/server.py
@@ -507,6 +507,8 @@ class ThreadedServer(CommonServer):
# We wait there is no processing requests
# other than the ones exceeding the limits, up to 1 min,
# before asking for a reload.
+ _logger.info('Dumping stacktrace of limit exceeding threads before reloading')
+ dumpstacks(thread_idents=[thread.ident for thread in self.limits_reached_threads])
self.reload()
# `reload` increments `self.quit_signals_received`
# and the loop will end after this iteration,
@@ -709,7 +711,7 @@ class PreforkServer(CommonServer):
raise KeyboardInterrupt
elif sig == signal.SIGQUIT:
# dump stacks on kill -3
- self.dumpstacks()
+ dumpstacks()
elif sig == signal.SIGUSR1:
# log ormcache stats on kill -SIGUSR1
log_ormcache_stats()