Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

could not obtain lock on row in relation "ir_cron"

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
cronpostgresqllock
7 Replies
52847 Tampilan
Avatar
Mathias Colpaert

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

 

0
Avatar
Buang
Avatar
Bernard
Jawaban Terbai

Please check your ir_cron actions for "scheduled actions" that have  very small interval_time like 1 minute interval. It is likely that the next run is starting before the previous one is finished (LOCKED FOR UPDATE). This happens in scheduled actions like fetching mail from your mail server which may take longer than 1 or 2 minutes due to connection issues or alot of emails to download. 

3
Avatar
Buang
Avatar
wz
Jawaban Terbai

The setting max_cron_threads=1 apparently causes another issue though. Cron jobs are just stopping to work after a few days until the docker container gets restarted.

0
Avatar
Buang
Avatar
e_sjuhain@sana.iq
Jawaban Terbai

In my case, it turned out there was a cron that a previous developer added to the system that was always running and never getting done. I inspected the Odoo log file for ir_cron logs. A pair of starting/done logs look like so:

2024-05-30 10:09:29,891 481994 INFO HalaFTTH_db odoo.addons.base.models.ir_cron: Starting job Jobs Garbage Collector.

2024-05-30 10:09:29,895 481994 INFO HalaFTTH_db odoo.addons.base.models.ir_cron: Job Jobs Garbage Collector done.

However, my long running cron only had a 'Starting' but never a 'done' log line. When I turned off that cron, the module upgraded normally. 

0
Avatar
Buang
Avatar
Yves Goldberg
Jawaban Terbai

Same situation here, also looking for an answer.

0
Avatar
Buang
Avatar
Ermin Trevisan
Jawaban Terbai

Same situation here, also looking for an answer.

0
Avatar
Buang
Avatar
Jens Roehrssen
Jawaban Terbai

It seems that if the postgresql server comes up again after being down for a while, odoo tries to run all missed cron entries at once. This results in a bunch of those errors within seconds.

0
Avatar
Buang
Avatar
Zbik
Jawaban Terbai

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.

0
Avatar
Buang
Mathias Colpaert
Penulis

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?

Zbik

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

Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
ir.cron - Record cannot be modified right now
cron scheduler postgresql lock
Avatar
Avatar
Avatar
Avatar
3
Mar 15
22028
CRONs aren't executed after a certain time
cron postgresql odoo16features
Avatar
Avatar
Avatar
3
Apr 24
4544
TransactionRollbackError due to concurrent update.
cron table lock
Avatar
Avatar
1
Mar 15
8983
When Odoo 14 connects to PostgreSQL 15.7, the connection is idle but cannot be released
postgresql
Avatar
0
Feb 25
2820
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: fe_sendauth: no password supplied
postgresql
Avatar
Avatar
Avatar
2
Jan 25
9959
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now