Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

IM and multi thread (gevent and workers)

Subscribe

Get notified when there's activity on this post

This question has been flagged
geventimworkers
13 Replies
33877 Views
Avatar
Carlos Vasquez

Hi,

I notice that if I run the server with the odoo.py, using the workers parameter, I also get an additional process using the openerp-gevent script with runs at port 8072.

A couple of questions:

1. Can I change the gevent port number? If I want to run several instances of odoo in one server, they are going to try to use the same port for gevent.

2. Do I use the gevent port for users? If I do so, do this gevent process uses the other processes? The main question is, how can I use the live chat and maintain multi-process capability for my users?

Thanks

6
Avatar
Discard
Vassil Toumbev (vassybg)

I have same problem.

Carlos Vasquez
Author

Nobody knows?

E.R. Spada

--workers ? does not work, odoo should fix this issue. Should handle with reverse proxy etc:

Khatri Jeenit

When increase workers why it lost the global variables values ??

Avatar
Carlos Vasquez
Author Best Answer

I found the answer and I didn't want to let the question unanswered, so here it is:

You start the server with --workers > 0 (depending on your hardware), so you have that many threads on port 8069. You will also have a couple of cron threads on 8069 (configurable with --max-cron-threads) and one gevent thread on port 8072 (configurable with --longpolling-port).

You have to setup a reverse proxy (apache2 or nginx will do the job), and map your 8069 port to the external 80.

Here is the important part: you also have to reverse proxy your 8072 port to the external 80, but only for location /longpolling (in nginx this is done with a second location).

That way you have your users using the workers normally and the gevent thread only for getting the bus messages.

I will post soon a complete installation and configuration guide for v8.0 with all the details usually missing in available guides.

Regards

8
Avatar
Discard
Andrius Laukavičius

Hello, maybe you solved the part with gevent? I was able to launch Odoo with apache2 + wsgi and it is working, but im_chat is not working properly. I get bus.Bus exception. I guess it has something to do with gevent. When I ran Odoo out of the box, chat was working fine.

Mind And Go

Didi you try with wsgi?

Andrius Laukavičius

Well there are number of workers specified in wsgi file, but it seems it does nothing, when you run Odoo using apache2. I tried adding reverse proxy for longpolling, but I would always get connection refused error. You can see what I have tried in this issue: https://github.com/odoo/odoo/issues/3793

Carlos Vasquez
Author

@NOD, do you really need WSGI? I do not run odoo with WSGI but instead y just run the odoo.py with the correct options, from a config file. If you do so, using --workers=2 (or more) will enable longpolling. You will see that your odoo will listen on port 8072. You can change this with --longpolling-port=NNNN. Once odoo is running you can check what ports it is listening on with "netstat -lnput | grep python". If your are using default ports you will see it listening on ports 8069 and 8072. If you do, configure apache or nginx to do a reverse proxy on those ports. 8069 for all comunications except for /longpolling which should go to the longpolling one.

Andrius Laukavičius

I use wsgi to be able to run apache. And I use to create subdomains, so I can access database by entering something like db1.domain.com. Normally running odoo that was not possible (or I don't know how).

Mind And Go

Hy Carlos, first I was thinking like you. No need to use wsgi and all the deployment stuff for making running odoo. Yet, when you start to go through service failure, reverse proxy issues etc... running an embedded deployement conf bind to your favorite webserver is a great chance.
Additionnly you could do some conf with wsgi that hou can't easily do with default conf. I agree with @NOD

Mind And Go

Hy Carlos, Any additionnal tip on this?

Avatar
陈伟
Best Answer

My question is even when I set worker > 0, there no gevent process listen to 8072.

And I found in source code only one line will use longpolling_port, which is in the __init__() of GeventServer, and only when the odoo is configured to user gevent server, the GeventServer will be constructed instead of PreforkServer.

So I am totally confused, which port will be used for longpolling under multiprocess mode?

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Bus Unavailable Solved
workers
Avatar
Avatar
Avatar
Avatar
6
Feb 24
13918
Instant message with multiple workers= option
im
Avatar
0
Mar 15
4572
What is the gevent into V8.0 ? How its functioning ?
gevent
Avatar
Avatar
Avatar
2
Mar 15
5854
About configration odoo19_server.conf
configuration workers
Avatar
0
Nov 25
96
Multi Processing configuration for multiple instance! Solved
configuration workers
Avatar
Avatar
Avatar
2
Dec 24
18897
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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