Database backup error: CPU time limit exceeded.

Why it happens and how to solve it

This tutorial is going to show you how to solve the "CPU time limit exceeded" error. There is a simple fix but understanding what is actually causing the problem is also important.

Where is the error from?

When you ask Google about the topic you will see that a lot of people is facing the same problem. It usually happens when they going from Development to Production (Test to Live) stage. We all need a safe and trusted service for our customers and this means we should have an SSL certificate installed. You might think what is the connection between SSL and this? Well, there is as in order to discuss and live chat features work correctly it is necessary to activate workers in the system. Workers have their life and are sharing the server's resources. That is why the number of workers depends on the numbers of processors. Remember to follow official documentation in order to adjust your Odoo's configuration.

Regarding the "CPU time limit exceeded error" those two things would be responsible:

limit_time_cpu = 60
limit_time_real = 120 

How to fix it?

The fixture is quite simple. You need to access the Odoo configuration file, if you used my tutorials it would be in /etc/odoo-server.cfg, if you followed the offcial deployment documentation it would be in /et/odoo/openerp-server.cfg. Try to adjust the settings:

limit_time_cpu = 120
limit_time_real = 240 

and then restart the server:

sudo service odoo-server restart

Now test it by making a backup or running the feature that resulted in the error. Remember to save your previous config in order something went wrong. For more information please see the following topics on Odoo forum:

- how to resolve CPU time limit error

Configuration suggestions thread