Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

Odoo 10 CE performance tuning - enabling workers

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
performanceserversecurityworkersodoov10.0
1 Rispondi
29693 Visualizzazioni
Avatar
Carlo

Hi,

I will try explain the best I can the problem I have with Odoo 10 CE running on Ubuntu 16.04 LTS VM placed on on-premise HP Proliant G6 running hyper-v.

`Physical server specs:`

` - Processor Intel(R) Xeon(R) CPUX5560 @ 2.80GHz, 2800 Mhz, 4 Core(s), 8 Logical Processor(s)

- OS Name Microsoft Windows Server 2012 R2 Datacenter

- Installed Physical Memory (RAM) 16,0 GB

- 5x 10k SAS drives raid 1+0 (one hot spare)`

`Ubuntu VM specs:`

`carlo@enecom:~$ lscpu

Architecture: x86_64

CPU op-mode(s): 32-bit, 64-bit

Byte Order: Little Endian

CPU(s): 8

On-line CPU(s) list: 0-7

Thread(s) per core: 1

Core(s) per socket: 8

Socket(s): 1

NUMA node(s): 1

Vendor ID: GenuineIntel

CPU family: 6

Model: 26

Model name: Intel(R) Xeon(R) CPU X5560 @ 2.80GHz

Stepping: 5

CPU MHz: 2762.494

BogoMIPS: 5524.98

Hypervisor vendor: Microsoft

Virtualization type: full

L1d cache: 32K

L1i cache: 32K

L2 cache: 256K

L3 cache: 8192K

NUMA node0 CPU(s): 0-7

Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl pni ssse3 cx16 sse4_1 sse4_2 popcnt hypervisor lahf_lm kaiser

carlo@enecom:~$`

4Gb RAM machine

`carlo@enecom:~$ free -m

total used free shared buff/cache available

Mem: 3164 291 1984 113 889 2684

Swap: 4091 0 4091

carlo@enecom:~$`

I would like to enable workers to get better performance. There are only few users using the odoo instance.

Can someone please help me with error which I get every time when I change workers to value > 0 ?

`2018-01-13 11:23:36,666 9225 ERROR ENECOM odoo.http: Exception during JSON request handling.

Traceback (most recent call last):

File "/odoo/odoo-server/odoo/http.py", line 640, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/odoo/odoo-server/odoo/http.py", line 677, in dispatch

result = self._call_function(**self.params)

File "/odoo/odoo-server/odoo/http.py", line 333, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/odoo/odoo-server/odoo/service/model.py", line 101, in wrapper

return f(dbname, *args, **kwargs)

File "/odoo/odoo-server/odoo/http.py", line 326, in checked_call

result = self.endpoint(*a, **kw)

File "/odoo/odoo-server/odoo/http.py", line 935, in __call__

return self.method(*args, **kw)

File "/odoo/odoo-server/odoo/http.py", line 506, in response_wrap

response = f(*args, **kw)

File "/odoo/odoo-server/addons/bus/controllers/main.py", line 35, in poll

raise Exception("bus.Bus unavailable")

Exception: bus.Bus unavailable`

This is my odoo-server.conf (part of it)

`limit_memory_hard = 2147483648

limit_memory_soft = 1572864000

limit_request = 8192

limit_time_cpu = 600

limit_time_real = 1200

limit_time_real_cron = -1

workers = 9

xmlrpc = True

xmlrpc_interface =

xmlrpc_port = 8069

longpolling_port = 8072

max_cron_threads = 2`

Can you please help me with this error?

Also I'm running Odoo on apache2 with reverse proxy.

Maybe my values in conf file are not correct?

1
Avatar
Abbandona
Avatar
Xavier Brochard
Risposta migliore

IMHO the error comes from the worker attached to longpolling. Disable `longpolling_port` first.

Regarding best practices, have a look at the slides and corresponding video from Olivier Dony (Odoo's SaaS Engineer), see slide 3 for a quick preview on values.

https://www.youtube.com/watch?v=A_BWyFeGgVA

https://www.odoo.com/slides/slide/performance-tips-tricks-399

About your config datas :

limit_memory_hard = 2147483648
limit_memory_soft = 1572864000
limit_request = 8192
limit_time_cpu = 600
limit_time_real = 1200
limit_time_real_cron = -1
workers = 9
xmlrpc = True
xmlrpc_interface =
xmlrpc_port = 8069
longpolling_port = 8072
max_cron_threads = 2

No need for this, it is default values (see server.py in Odoo code) :

limit_time_cpu = 600
limit_time_real = 120

Workers value is low, it could be around 16-18, because you need 6 workers per users (browser keepalive) :

workers = 9

But in this case you need to decrease the soft and hard limit for memory used (soft = ram / workers) :

limit_memory_soft = 268435456


But it really depends on how Odoo is used : how much apps are loaded, how long does it runs, etc.

Do not forget to tweak also Postgresql ! At least with pgtune http://pgtune.leopard.in.ua/

 

3
Avatar
Abbandona
Carlo
Autore

Thanks, but I really have problem undestanding this and I would need some more explanation.

How do I disable lonpolling port ? Tried to comment in conf file but does not help.

How did you get memory soft 268435456.

When I divide 4gb ram by 9 workers I don't get that value.

My original question is little bit messy but when I try to edit post to style the question I get 403 error.

This errors doesent have anything to do with apache reverse proxy?

How to calculate soft and hard memory for my VM

workers = 16

8 cpu's

1 thread per core

8 core per socket

4 gb ram

how can I divide dedicated ram by worker soft memory limit when I don't know it's value.

Thanks

Xavier Brochard

- To disable longpolling, just comment it out in config. You can also disable xmlrpc values because these are default.

- Memory is expressed in bytes. 4 GB = 4 x 1024 G x 1024 M x 1024 k. Result is divided by 16 workers, not 9.

- The error doesn't look related to Apache, it comes directly from Odoo. For checking this, you can bypass Apache by accessing odoo built-in http server on the 8069 port like that http://IP:80699 BTW, did you enable proxy-mode ? you need to.

- You will learn more on the error by enabling debug log. Look at the Command-line options in Odoo Developer documentation : https://www.odoo.com/documentation/10.0/reference/cmdline.html

Carlo
Autore

Raised RAM (8gb) to follow some guides online and still can't get this to work.

Let's say I want 9 workers

hard mem = 768 x 9 = 7247757312

soft mem = 640 x 9 = 6039797760

My conf :

....

#limit_memory_hard = 7247757312

#limit_memory_soft = 6039797760

limit_request = 8192

limit_time_cpu = 60

limit_time_real = 120

limit_time_real_cron = -1

list_db = True

log_db = False

log_db_level = warning

log_handler = :INFO

log_level = info

logfile = /var/log/odoo/odoo-server.log

logrotate = False

#longpolling_port = 8072

max_cron_threads = 2

osv_memory_age_limit = 1.0

osv_memory_count_limit = False

pg_path = None

pidfile = False

proxy_mode = True

reportgz = False

server_wide_modules = web,web_kanban

smtp_password = False

smtp_port = 25

smtp_server = localhost

smtp_ssl = False

smtp_user = False

syslog = False

test_commit = False

test_enable = False

test_file = False

test_report_directory = False

translate_modules = ['all']

unaccent = False

without_demo = False

workers = 9

xmlrpc = True

xmlrpc_interface =

#xmlrpc_port = 8069

proxy_mode = True

Carlo
Autore

I still get errors like

2018-01-14 13:38:36,480 3789 INFO ENECOM werkzeug: 192.168.10.70 - - [14/Jan/2018 13:38:36] "POST /longpolling/poll HTTP/1.1" 200 -

2018-01-14 13:38:49,766 3795 INFO ? odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections to 'user=odoo dbname=TEST'

2018-01-14 13:38:49,785 3795 INFO ? odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections to 'user=odoo dbname=ENECOM'

2018-01-14 13:38:50,659 3796 INFO ? odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections to 'user=odoo dbname=TEST'

2018-01-14 13:38:50,683 3796 INFO ? odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections to 'user=odoo dbname=ENECOM'

2018-01-14 13:38:56,474 3791 ERROR ENECOM odoo.http: Exception during JSON request handling.

Traceback (most recent call last):

File "/odoo/odoo-server/odoo/http.py", line 640, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/odoo/odoo-server/odoo/http.py", line 677, in dispatch

result = self._call_function(**self.params)

File "/odoo/odoo-server/odoo/http.py", line 333, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/odoo/odoo-server/odoo/service/model.py", line 101, in wrapper

return f(dbname, *args, **kwargs)

File "/odoo/odoo-server/odoo/http.py", line 326, in checked_call

result = self.endpoint(*a, **kw)

File "/odoo/odoo-server/odoo/http.py", line 935, in __call__

return self.method(*args, **kw)

File "/odoo/odoo-server/odoo/http.py", line 506, in response_wrap

response = f(*args, **kw)

File "/odoo/odoo-server/addons/bus/controllers/main.py", line 35, in poll

raise Exception("bus.Bus unavailable")

Exception: bus.Bus unavailable

I can see that it works better in browser but I just can't pass through errors and warnings in logs.

Xavier Brochard

Please, enable debug log as I suggested.

Xavier Brochard

Please, did you try direct access by using url like http://IP:8069 ? wat happened ?

Did you install the chat module ? then, uninstall it.

Carlo
Autore

I don't have website chat module installed, same errors when I access Odoo at ip:port.

When i start odoo-bin --log-handler :DEBUG --log-handler werkzeug:CRITICAL --log-handler odoo.fields:WARNING

then I get error 500

https://pastebin.com/8QFjQKB3

Xavier Brochard

you have no database connection

Carlo
Autore

I don't know how to enable debug mode properly. I will respond to your message when I learn how.

Xavier Brochard

Carlo, the log you have posted shows that you miss a database connection (10 last lines). That's why you get the error 500.

The Bus unavailable exception is common in various cases (I got it yesterday after a few changes in my config). So we need debug mode to get more informations and understand from where the error comes. Enabling debug is well documented in Documentation / Developer /Command-line interface: odoo-bin / Running the server / logging https://www.odoo.com/documentation/10.0/reference/cmdline.html You may also have a look in the file odoo/tools/config.py

Xavier Brochard

To clarify : you server is up and running, right ? you have this exception in the log that you don't understand but it doesn't block functionalities ?

Carlo
Autore

Yes! My server is up and running and I work in Odoo normally. I’ve used install script for v10 and I dont relly know how to enable debug mode.

Whole deployment for my company is set through public modules on github. I want to learn more about odoo and maybe write some modules but I’m still learning.

Instance is started at boot because I added server to init.d and I can stop server using terminal but don’t really know how to start with debug params.

I start server with sudo service odoo-server start

Carlo
Autore

I only get that database related error when I try to start with debug mode

Xavier Brochard

Ok. I didn't understood that at first. This exception happens because in multiprocess, live chat is automatically enable. If it is not configured, there is no bus available, that's all. For further information, look for LiveChat in "Deploying Odoo" in Developer documentation.

To fix, install the chat module and enable proxy for longpolling. There is a configuration sample in the same "Deploying Odoo" documentation.

I am also trying to learn Odoo. My setup is different : I use nightly builds packages and modules from Github. I clone the repositories (mainly from OCA) and link the modules I need to the addons folder. From time to time, I report bugs and improve modules. I'm sysadmin, not developer. So it is difficult for me to understand how code works. May be we could learn together ?

APISAK SRIHAMAT

Do you define the solution as install LiveChat module and enable proxy for longpolling ?

Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
Seeking Odoo Server Performance configuration/ advice / tips / benchmarks for 60 concurrent users
performance postgresql workers tuning odoo
Avatar
0
mar 24
4349
How to Run Multiple Workers In ODOO?
workers odoo
Avatar
Avatar
1
mag 15
9991
cache in odoo ?
performance cache odoo
Avatar
0
giu 21
5757
How i can change default filestore location in odoo10? Risolto
filestore odoo v10.0
Avatar
Avatar
Avatar
Avatar
4
ago 20
22675
Use Of Public Profile In Forum ? Risolto
forum odoo v10.0
Avatar
1
apr 19
834
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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