Odoo Help

Welcome!

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.

0

could not obtain lock on row in relation "ir_cron"

By
Mathias Colpaert
on 1/29/15, 2:37 AM 5,141 views

In my postgresql log, I see following error (keeps on beeing logged over and over):

2015-01-28 17:40:26 UTC ERROR:  could not obtain lock on row in relation "ir_cron"
2015-01-28 17:40:26 UTC STATEMENT:  SELECT *
                                       FROM ir_cron
                                       WHERE numbercall != 0
                                          AND active
                                          AND nextcall <= (now() at time zone 'UTC')
                                          AND id=2
                                       FOR UPDATE NOWAIT
2015-01-28 17:41:32 UTC ERROR:  could not obtain lock on row in relation "ir_cron"
2015-01-28 17:41:32 UTC STATEMENT:  SELECT *
                                       FROM ir_cron
                                       WHERE numbercall != 0
                                          AND active
                                          AND nextcall <= (now() at time zone 'UTC')
                                          AND id=7
                                       FOR UPDATE NOWAIT
2015-01-28 18:36:39 UTC ERROR:  could not obtain lock on row in relation "ir_cron"
2015-01-28 18:36:39 UTC STATEMENT:  SELECT *
                                       FROM ir_cron
                                       WHERE numbercall != 0
                                          AND active
                                          AND nextcall <= (now() at time zone 'UTC')
                                          AND id=1
                                       FOR UPDATE NOWAIT
2015-01-28 19:30:44 UTC ERROR:  could not obtain lock on row in relation "ir_cron"
2015-01-28 19:30:44 UTC STATEMENT:  SELECT *
                                       FROM ir_cron
                                       WHERE numbercall != 0
                                          AND active
                                          AND nextcall <= (now() at time zone 'UTC')
                                          AND id=9
                                       FOR UPDATE NOWAIT
2015-01-28 19:36:57 UTC ERROR:  could not obtain lock on row in relation "ir_cron"
2015-01-28 19:36:57 UTC STATEMENT:  SELECT *
                                       FROM ir_cron
                                       WHERE numbercall != 0
                                          AND active
                                          AND nextcall <= (now() at time zone 'UTC')
                                          AND id=1
                                       FOR UPDATE NOWAIT
2015-01-28 19:41:07 UTC ERROR:  could not obtain lock on row in relation "ir_cron"
2015-01-28 19:41:07 UTC STATEMENT:  SELECT *
                                       FROM ir_cron
                                       WHERE numbercall != 0
                                          AND active
                                          AND nextcall <= (now() at time zone 'UTC')
                                          AND id=2
                                       FOR UPDATE NOWAIT
2015-01-28 19:41:16 UTC ERROR:  could not obtain lock on row in relation "ir_cron"
2015-01-28 19:41:16 UTC STATEMENT:  SELECT *
                                       FROM ir_cron
                                       WHERE numbercall != 0
                                          AND active
                                          AND nextcall <= (now() at time zone 'UTC')
                                          AND id=7
                                       FOR UPDATE NOWAIT
2015-01-28 21:11:30 UTC ERROR:  could not obtain lock on row in relation "ir_cron"
2015-01-28 21:11:30 UTC STATEMENT:  SELECT *
                                       FROM ir_cron
                                       WHERE numbercall != 0
                                          AND active
                                          AND nextcall <= (now() at time zone 'UTC')
                                          AND id=7
                                       FOR UPDATE NOWAIT
2015-01-28 23:30:43 UTC ERROR:  could not obtain lock on row in relation "ir_cron"
2015-01-28 23:30:43 UTC STATEMENT:  SELECT *
                                       FROM ir_cron
                                       WHERE numbercall != 0
                                          AND active
                                          AND nextcall <= (now() at time zone 'UTC')
                                          AND id=9
                                       FOR UPDATE NOWAIT
2015-01-28 23:36:55 UTC ERROR:  could not obtain lock on row in relation "ir_cron"
2015-01-28 23:36:55 UTC STATEMENT:  SELECT *
                                       FROM ir_cron
                                       WHERE numbercall != 0
                                          AND active
                                          AND nextcall <= (now() at time zone 'UTC')
                                          AND id=1
                                       FOR UPDATE NOWAIT
2015-01-28 23:41:03 UTC ERROR:  could not obtain lock on row in relation "ir_cron"
2015-01-28 23:41:03 UTC STATEMENT:  SELECT *
                                       FROM ir_cron
                                       WHERE numbercall != 0
                                          AND active
                                          AND nextcall <= (now() at time zone 'UTC')
                                          AND id=2
                                       FOR UPDATE NOWAIT
2015-01-28 23:41:14 UTC ERROR:  could not obtain lock on row in relation "ir_cron"
2015-01-28 23:41:14 UTC STATEMENT:  SELECT *
                                       FROM ir_cron
                                       WHERE numbercall != 0
                                          AND active
                                          AND nextcall <= (now() at time zone 'UTC')
                                          AND id=7
                                       FOR UPDATE NOWAIT
2015-01-29 03:07:02 UTC ERROR:  could not obtain lock on row in relation "ir_cron"
2015-01-29 03:07:02 UTC STATEMENT:  SELECT *
                                       FROM ir_cron
                                       WHERE numbercall != 0
                                          AND active
                                          AND nextcall <= (now() at time zone 'UTC')
                                          AND id=1
                                       FOR UPDATE NOWAIT
2015-01-29 04:07:25 UTC ERROR:  could not obtain lock on row in relation "ir_cron"
2015-01-29 04:07:25 UTC STATEMENT:  SELECT *
                                       FROM ir_cron
                                       WHERE numbercall != 0
                                          AND active
                                          AND nextcall <= (now() at time zone 'UTC')
                                          AND id=1
                                       FOR UPDATE NOWAIT

What is causing this error?

I have following configuration:

  • Odoo v8.0
  • Ubuntu 14.04 LTS on vps
  • No outgoing mailserver configured

 

Same situation here, also looking for an answer.

Ermin Trevisan
on 3/10/15, 3:10 AM

Same situation here, also looking for an answer.

Ygol InternetWork, Yves Goldberg
on 5/26/16, 8:19 AM
0

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 3/10/15, 3:29 AM

You verify how many openerp server instances have run.

>ps aux | grep oepenrp

or, you set in openerp-server.conf

max_cron_threads = 1

This appears to be because two cron threads run the same command.

I only have 1 server instance running. max_cron_threads is set to 2, but if this is the bug, why does this option even exist? Should I always put max_cron_threads = 1, and why?

Mathias Colpaert
on 5/29/15, 9:59 AM

If the whole system works properly, settings max_cron_threads = 2 is good.

zbik
on 5/29/15, 12:35 PM

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

3 follower(s)

Stats

Asked: 1/29/15, 2:37 AM
Seen: 5141 times
Last updated: 3/16/15, 8:10 AM