Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

Odoo 10 CE performance tuning - enabling workers

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
performanceserversecurityworkersodoov10.0
1 Responder
29686 Vistas
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
Descartar
Avatar
Xavier Brochard
Mejor respuesta

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
Descartar
Carlo
Autor

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
Autor

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
Autor

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
Autor

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
Autor

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
Autor

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
Autor

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 ?

¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
Seeking Odoo Server Performance configuration/ advice / tips / benchmarks for 60 concurrent users
performance postgresql workers tuning odoo
Avatar
0
mar 24
4343
How to Run Multiple Workers In ODOO?
workers odoo
Avatar
Avatar
1
may 15
9990
cache in odoo ?
performance cache odoo
Avatar
0
jun 21
5755
How i can change default filestore location in odoo10? Resuelto
filestore odoo v10.0
Avatar
Avatar
Avatar
Avatar
4
ago 20
22673
Use Of Public Profile In Forum ? Resuelto
forum odoo v10.0
Avatar
1
abr 19
834
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

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