[18.0] queue_job: remove_db -> psycopg2.DatabaseError: out of memory for query result
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 22/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- postgresql, python
- Lĩnh vực
- backend, performance
Hướng nghiên cứu
The traceback points to initialize_databases in queue_job/jobrunner/runner.py (around line 403), which iterates a cursor over every queue_job row, and to remove_db in queue_job/jobrunner/channels.py (around line 1139), which copies _jobs_by_uuid into a list. Read how the job loading query is built and how the channel manager stores jobs. Done means the runner survives a backlog of millions of pending jobs without loading them all into memory, ideally with a test or a reproduction script that shows the memory use.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Module
queue_job
Describe the bug
2026-11-01 13:40:47,969 147583 ERROR ? odoo.addons.queue_job.jobrunner.runner: exception: sleeping 5s and retrying
--
Traceback (most recent call last):
File "/usr/local/src/metricwise/oca/queue/queue_job/jobrunner/runner.py", line 502, in run
self.initialize_databases()
File "/usr/local/src/metricwise/oca/queue/queue_job/jobrunner/runner.py", line 403, in initialize_databases
for job_data in cr:
psycopg2.DatabaseError: out of memory for query result
2026-11-01 13:40:47,972 147583 WARNING ? odoo.addons.queue_job.jobrunner.runner: error closing database odoo
Traceback (most recent call last):
File "/usr/local/src/metricwise/oca/queue/queue_job/jobrunner/runner.py", line 390, in close_databases
self.channel_manager.remove_db(db_name)
File "/usr/local/src/metricwise/oca/queue/queue_job/jobrunner/channels.py", line 1139, in remove_db
for job in list(self._jobs_by_uuid.values()):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
MemoryError
>>> env.cr.execute('SELECT state, count(*) FROM queue_job GROUP BY state')
>>> env.cr.fetchall()
[('done', 81056), ('enqueued', 1), ('failed', 150), ('pending', 4009271), ('wait_dependencies', 3)]
To Reproduce
Affected versions: 18.0.3.1.3
Steps to reproduce the behavior:
- Queue up several million jobs.
- Attempt to run them.
- Ngôn ngữ chính
- Python
- Star
- 271
- Fork
- 602
- Merge trung bình
- 4 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OCA/queue
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Migration to version 20.0Đang mởhelp wanted no stale work in progress
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
OCA/queue#1002 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Delaying unlink or write on a model whose method was replaced raises AttributeError at enqueue timeCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[19.0] queue_job: Jobs stay pending after the jobrunner's database connection is silently droppedCó thể đã có người làm @HoloborodkoBohdan đã nhận 35 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
OCA/queue#984 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aws/sagemaker-python-sdk#6554 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
huggingface/diffusers#15170 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] LLM conflict check ignores MNEMOSYNE_LLM_MAX_TOKENS, so reasoning models return empty repliesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
mnemosyne-oss/mnemosyne#1325 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement meshtastic-2.8
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
pskillen/meshflow-api#459 ·