Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Does a cron task have a timeout ?

Emanuel Cino
on 11/5/14, 4:48 AM 3,028 views

I have a very long process of invoice generation and validation that works when I do it from the browser (even if it takes several hours to complete). I created a cron task that executes the same process. I can see that the cron successfully starts, but it seems to never finish. It must be silently killed, because I can see no error.

Do you know if there is some timeout for the cron tasks ? If so, how can I change this setting in order to increase the timeout limit ?


Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
| 5 3 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 11/5/14, 4:59 AM

no time-out is set at CRON job.

but the openerp-server has a time-out.  

1. If time-out needs to be increased, you need to configure openerp-server parameters.

These are the basic options available at OpenERP.

  Multiprocessing options:
    --workers=WORKERS   Specify the number of workers, 0 disable prefork mode.
                        Maximum allowed virtual memory per worker, when
                        reached the worker be reset after the current request
                        (default 671088640 aka 640MB).
                        Maximum allowed virtual memory per worker, when
                        reached, any memory allocation will fail (default
                        805306368 aka 768MB).
                        Maximum allowed CPU time per request (default 60).
                        Maximum allowed Real time per request (default 120).
                        Maximum number of request to be processed per worker
                        (default 8192).

2. After every update of record, if it is successful. force the cursor to commit

except Exception as e:
      Handle exception if needed

By doing this, you could avoid processing the same records if the CRON job is killed due to TIME-OUT.

Thank you very much for this complete answer. If I have no timeout when I do the request from the browser, does it mean that my issue is not a server timeout ? Why would it be different when executing by a cron ? Nice tip for the commit, I will try to use it.

Emanuel Cino
on 11/5/14, 5:24 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 11/5/14, 4:48 AM
Seen: 3028 times
Last updated: 3/16/15, 8:10 AM