RuntimeError: can't start new thread

Open
#483 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
docker, docker-compose, postgres, python

Research direction

Start with the supplied docker-compose.yml and the Odoo startup traceback, especially odoo/service/server.py at http_spawn. Reproduce the failure with the Odoo 17 and Postgres 13 images, then determine the environmental cause of the thread-creation error. Done means documenting a confirmed cause and the required deployment change.

Written by the indexing model from the issue text.

Description

Just trying to run Odoo 17. But i get an error. What could be the reason?

Logs:

2023-12-13 15:10:40,679 1 INFO ? odoo: Odoo version 17.0-20231208
2023-12-13 15:10:40,679 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
2023-12-13 15:10:40,679 1 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons', '/var/lib/odoo/addons/17.0', '/mnt/extra-addons']
2023-12-13 15:10:40,680 1 INFO ? odoo: database: odoo@db:5432
2023-12-13 15:10:40,872 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
Traceback (most recent call last):
  File "/usr/bin/odoo", line 8, in <module>
    odoo.cli.main()
  File "/usr/lib/python3/dist-packages/odoo/cli/command.py", line 66, in main
    o.run(args)
  File "/usr/lib/python3/dist-packages/odoo/cli/server.py", line 179, in run
    main(args)
  File "/usr/lib/python3/dist-packages/odoo/cli/server.py", line 172, in main
    rc = odoo.service.server.start(preload=preload, stop=stop)
  File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 1402, in start
    rc = server.run(preload, stop)
  File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 577, in run
    self.start(stop=stop)
  File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 531, in start
    self.http_spawn()
  File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 511, in http_spawn
    t.start()
  File "/usr/lib/python3.10/threading.py", line 935, in start
    _start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread

docker-compose.yml:

version: '3.1'
services:
  web:
    image: odoo:17.0
    depends_on:
      - db
    ports:
      - "8069:8069"
      - "8072:8072"
    environment:
      - HOST=db
      - USER=odoo
      - PASSWORD=myodoo
  db:
    image: postgres:13
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_USER=odoo
      - POSTGRES_PASSWORD=myodoo
      - PGDATA=/var/lib/postgresql/data/pgdata

Dominant language
Dockerfile
Stars
1.2k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from odoo/docker

All issues in odoo/docker

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.