{"id":757,"date":"2021-04-22T13:13:42","date_gmt":"2021-04-22T07:13:42","guid":{"rendered":"https:\/\/mellowhost.com\/blog\/?p=757"},"modified":"2021-04-22T13:13:42","modified_gmt":"2021-04-22T07:13:42","slug":"odoo-error-virtual-real-time-limit-151-120s-reached","status":"publish","type":"post","link":"https:\/\/mellowhost.com\/blog\/odoo-error-virtual-real-time-limit-151-120s-reached.html","title":{"rendered":"Odoo Error &#8211; virtual real time limit (151\/120s) reached."},"content":{"rendered":"\n<p>There are times, when you might suddenly see your Odoo is shutdown automatically, without warning. Once you enable to logging, you could see an error like the following:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">virtual real time limit (151\/120s) reached.<\/pre>\n\n\n\n<p>or in full details like the following<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">2021-04-22 06:46:44,054 32685 WARNING ? odoo.service.server: Thread &lt;Thread(odoo.service.http.request.140015617943296, started 140015617943296)> virtual real time limit (151\/120s) reached.\n2021-04-22 06:46:44,054 32685 INFO ? odoo.service.server: Dumping stacktrace of limit exceeding threads before reloading\n2021-04-22 06:46:44,060 32685 INFO ? odoo.tools.misc:\n# Thread: &lt;Thread(odoo.service.http.request.140015617943296, started 140015617943296)> (db:n\/a) (uid:n\/a) (url:n\/a)\nFile: \"\/opt\/rh\/rh-python36\/root\/usr\/lib64\/python3.6\/threading.py\", line 884, in _bootstrap\n  self._bootstrap_inner()\nFile: \"\/opt\/rh\/rh-python36\/root\/usr\/lib64\/python3.6\/threading.py\", line 916, in _bootstrap_inner\n  self.run()\nFile: \"\/opt\/rh\/rh-python36\/root\/usr\/lib64\/python3.6\/threading.py\", line 864, in run\n  self._target(*self._args, **self._kwargs)\nFile: \"\/opt\/rh\/rh-python36\/root\/usr\/lib64\/python3.6\/socketserver.py\", line 654, in process_request_thread\n  self.finish_request(request, client_address)\nFile: \"\/opt\/rh\/rh-python36\/root\/usr\/lib64\/python3.6\/socketserver.py\", line 364, in finish_request\n  self.RequestHandlerClass(request, client_address, self)\nFile: \"\/opt\/rh\/rh-python36\/root\/usr\/lib64\/python3.6\/socketserver.py\", line 724, in __init__\n  self.handle()\nFile: \"\/opt\/odoo\/odoo14-venv\/lib64\/python3.6\/site-packages\/werkzeug\/serving.py\", line 329, in handle\n  rv = BaseHTTPRequestHandler.handle(self)\nFile: \"\/opt\/rh\/rh-python36\/root\/usr\/lib64\/python3.6\/http\/server.py\", line 418, in handle\n  self.handle_one_request()\nFile: \"\/opt\/odoo\/odoo14-venv\/lib64\/python3.6\/site-packages\/werkzeug\/serving.py\", line 360, in handle_one_request\n  self.raw_requestline = self.rfile.readline()\nFile: \"\/opt\/rh\/rh-python36\/root\/usr\/lib64\/python3.6\/socket.py\", line 586, in readinto\n  return self._sock.recv_into(b)\n2021-04-22 06:46:44,060 32685 INFO ? odoo.service.server: Initiating server reload\n<\/pre>\n\n\n\n<p>This is because Odoo is killing zombie processes and probably mistakenly crashing your Odoo completely while doing so. The parameter that is used for this purpose, can be found in Odoo documentation:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.odoo.com\/documentation\/14.0\/reference\/cmdline.html\">https:\/\/www.odoo.com\/documentation\/14.0\/reference\/cmdline.html<\/a><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">--limit-time-real &lt;limit>\nPrevents the worker from taking longer than &lt;limit> seconds to process a request. If the limit is exceeded, the worker is killed.\n\nDiffers from --limit-time-cpu in that this is a \u201cwall time\u201d limit including e.g. SQL queries.\n\nDefaults to 120.<\/pre>\n\n\n\n<p>You may start your service command with something like &#8211;limit-time-real 100000 to avoid Odoo from auto killing processes. A command could look like the following if you edit your service file located at:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/etc\/systemd\/system\/odoo14.service<\/pre>\n\n\n\n<p>The exec would be like the following:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ExecStart=\/usr\/bin\/scl enable rh-python36 -- \/opt\/odoo\/odoo14-venv\/bin\/python3 \/opt\/odoo\/odoo14\/odoo-bin -c \/etc\/odoo.conf --limit-time-real=100000<\/pre>\n\n\n\n<p>Once the change is done, save the file, and reload the system daemon and restart your Odoo<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">systemctl daemon-reload\nservice odoo14 restart<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are times, when you might suddenly see your Odoo is shutdown automatically, without warning. Once you enable to logging, you could see an error like the following: or in full details like the following This is because Odoo is killing zombie processes and probably mistakenly crashing your Odoo completely while doing so. The parameter &hellip; <a href=\"https:\/\/mellowhost.com\/blog\/odoo-error-virtual-real-time-limit-151-120s-reached.html\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Odoo Error &#8211; virtual real time limit (151\/120s) reached.&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[292],"tags":[220,297,563],"_links":{"self":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/757"}],"collection":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/comments?post=757"}],"version-history":[{"count":1,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/757\/revisions"}],"predecessor-version":[{"id":758,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/757\/revisions\/758"}],"wp:attachment":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/media?parent=757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/categories?post=757"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/tags?post=757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}