도움말

0

Kept having popup of "Connection Lost" and "Connection Restored" and also kept being disconnected

Avatar
Nathan

Hello,

I'm currently using Odoo 12.0+e-20181025. At first, we didn't have that problem, but lately it has become more and more unstable. When it happened, I and my users can't connect to Odoo. I tried checking the connection to the server and found it was normal and stable. But we can't connect to Odoo application for a few minutes. Even after I restarted the server, it kept going like that. Only after a few minutes (between 7-12 minutes) it will return to normal again and usually will keep being normal throughout the day. But these couple of days, it started to happen more and more often. 

Is this normal and does anyone have a way to fix this? My users workload is quite big and we can't be having this interruption.

Thanks for reading and for the help.  

2 의견
아바타
작성취소
Avatar
Hilar Andikkadavath
-

Are you getting any error logs while happening the issue?

Avatar
Nathan
-

No, no error log whatsoever. After restarting the service, everything is fine. Well, until it turned like that again that is.

20 답변
4
Avatar
Eddy Garnir
최고의 답변

Try this :    in the Odoo config, I changed only two parameters .. 

proxy_mode = True

workers = 3

This solved it for me .. 

Ed,


2 의견
아바타
작성취소
Avatar
tahirhan
-

thanks, it worked for me. In my case proxy_mode was True but workers variable was equal to 0 .

Avatar
Carlos A García
-

For me works too and error is gone in Odoo 13:

proxy_mode = True

workers = 2

Thanks!

0
Avatar
Bernardo
최고의 답변

hey @Nathan, can you describe what are your working specs? I've a Google compute engine instance with 1 vCPU and 1.75GB of memory and I keep getting this error. I cannot add more workers because my installation is a bitnami installation which is WSGI [based](https://community.bitnami.com/t/odoo-worker-and-longpolling-problem/65656/13?u=bermick) and cannot add workers

Thanks!

아바타
작성취소
0
Avatar
Monica Sena
최고의 답변

Hi anyone found solution for odoo13. I have tried the all the above but it is not working

2 의견
아바타
작성취소
Avatar
christian muland
-

Enabling Multiprocessing

By default, Odoo is working in multithreading mode. For production deployments, it is recommended to change to the multiprocessing server as it increases stability, and make better usage of the system resources.

To enable multiprocessing you need to edit the Odoo configuration and set a non-zero number of worker processes. The number of workers is calculated based on the number of CPU cores in the system and the available RAM memory.

According to the official Odoo documentation to calculate the workers’ number and required RAM memory size, you can use the following formulas and assumptions:

Worker number calculation

Theoretical maximal number of worker = (system_cpus * 2) + 1

1 worker can serve ~= 6 concurrent users

Cron workers also require CPU

RAM memory size calculation

We will consider that 20% of all requests are heavy requests, and 80% are lighter ones. Heavy requests are using around 1 GB of RAM while the lighter ones are using around 150 MB of RAM

Needed RAM = number_of_workers * ( (light_worker_ratio * light_worker_ram_estimation) + (heavy_worker_ratio * heavy_worker_ram_estimation) )

If you do not know how many CPUs you have on your system, use the following grep command:

grep -c ^processor /proc/cpuinfo

Let’s say you have a system with 4 CPU cores, 8 GB of RAM memory, and 30 concurrent Odoo users.

30 users / 6 = **5** (5 is theoretical number of workers needed )

(4 * 2) + 1 = **9** ( 9 is the theoretical maximum number of workers)

Based on the calculation above, you can use 5 workers + 1 worker for the cron worker that is a total of 6 workers.

Calculate the RAM memory consumption based on the number of workers:

RAM = 6 * ((0.8*150) + (0.2*1024)) ~= 2 GB of RAM

The calculation shows that the Odoo installation will need around 2GB of RAM.

To switch to multiprocessing mode, open the configuration file and append the calculated values:

etc/odoo.conf or etc/odoo-server.conf then add

limit_memory_hard = 2684354560

limit_memory_soft = 2147483648

limit_request = 8192

limit_time_cpu = 600

limit_time_real = 1200

max_cron_threads = 1

workers = 5

sudo /etc/init.d/odoo-server restart

Avatar
Monica Sena
-

Hi @Christian, thank you for responding, I already enabled it and even increased the threads

proxy_mode = True

limit_memory_hard = 1677721600

limit_memory_soft = 629145600

limit_request = 8192

limit_time_cpu = 600

limit_time_real = 1200

max_cron_threads = 2

workers = 10

0
Avatar
Thuy Truc
최고의 답변

@Nathan did you solved this issue? I'm facing the same and stuck there for weeks.

I do not have enough karma to post comment, so I have to write my question as an answer!

4 의견
아바타
작성취소
Avatar
Nathan
-

Kind of. For a few months I managed to 'solve' it by increasing the server's memory and processor, but, just now, it starts to act like that again. My only advice is that you might want to look into your server's performance first. Hope that helps, coz that's what I'm doing right now.

Avatar
Thuy Truc
-

Thanks for your quick reply!

In my issue, I tried one more database server (Microsoft Azure), it work well without any problem.

But my customer do not want to use that database server anymore, so I have to find out what happend and solve it.

Anyway, I think our problem not came from your server, but somewhere in network protocol.

Avatar
Nathan
-

Just now my network and server administrator just tweak the server and it's performance. Hope it works Yeah, network is also one of the possible culprits for that too.

Avatar
Thuy Truc
-

Just let me know if you have solution for this. Thanks again!

0
Avatar
Andreas
최고의 답변

Same here. I've just set up a new Odoo 13 (CE) server on Ubuntu 18.04 and Nginx as https proxy.

1 댓글
아바타
작성취소
Avatar
Andreas
-
0
Avatar
zhanghao章浩
최고의 답변

Odoo 13.0 (Community Edition)
commit 1e8ea4f5628878dbc667c27d4e76ab42d3f140ea

We have this problem too! with firefox and chrome 。




1 댓글
아바타
작성취소
Avatar
Nathan
-

Even in Odoo 13? Oh wow. By the way, I have been able to at the very least reduced the frequency of that by whitelisting the server's IP in our network configuration. While that didn't solve it, hope that can help you somewhat.

0
최고의 답변

can any one solve this issue ?

아바타
작성취소
0
Avatar
Harri Matero
최고의 답변

Same issue here Odoo 13e

When i'll create first product (inventory) in empty db i'll start receive this "connection lost" errors.

Delete product and errors disapeard.

This issue is tested more than 1 db's.


아바타
작성취소