odoo / docker

Other
931 stars 1.51k forks source link

Slow performance when remote #422

Closed lowraxe closed 3 months ago

lowraxe commented 1 year ago

I've set up Odoo through Docker (and directly on Windows) and have found that I consistently get slow performance when accessing the interface remotely, as in from outside my office. Obviously, I would expect this to be a network issue, but I have had IT experts review my setup and none have found any issue with the network. I have a 100mbps up and down connection, and the network I usually connect through is around the same speed. The main symptom that I have is getting the "trying to reconnect", and "connection restored" messages when in the process of moving from one screen to another in Odoo.

I've gone down the rabbit hole of making changes to the conf file, both for Odoo and Postgres, but that does not appear to have had the effect. Internally, the changes to the odoo config file made an amazing difference, but it seems to be about the same externally.

Other things I've read specifically about postgres indicate that it may be sending data back and forth that could remain local, but I didn't get a clear indication of how to resolve that issue.

Is anyone else experiencing the same with a Docker Odoo install? Anyone out there have any solutions for me? Thanks!

hoangtrann commented 1 year ago

A good way to verify is to use tailscale and see hot it goes. I've been using this setup and have no issue so far.

lowraxe commented 1 year ago

Hi, I'm really not very experienced, so I'm not sure what you mean by "use tailscale". I see that it is available as a docker package, but I'm not sure how this would do anything for the issue I'm experiencing.

Sorry for my ignorance on this, but if you could explain what you mean a bit more, and how to set it up, I'd really appreciate it.

Thanks!

lathama commented 3 months ago

I am not experienced with Docker on Microsoft Windows. Are you able to share versions of Odoo, Host Operating System version and process you took to setup your env?

Are you able to test/confirm on a non-Microsoft Windows system?

amh-mw commented 3 months ago

The main symptom that I have is getting the "trying to reconnect", and "connection restored" messages when in the process of moving from one screen to another in Odoo.

IIRC, those messages are directly related to the longpolling/websocket endpoint, which shares a port with regular web workers when --workers=0 or gets its own port for --workers > 0. Here's the bad news per

https://www.odoo.com/documentation/17.0/developer/reference/cli.html#multiprocessing

multiprocessing mode is only available on Unix-based systems

So I don't really know that Odoo is considered viable for production workloads on Windows...

lowraxe commented 3 months ago

I found that I could set up Odoo behind a reverse proxy, which dramatically improved its performance. Thanks for all the help everyone offered in any case!

lathama commented 3 months ago

@lowraxe if you are done with this issue can you close it?

lowraxe commented 3 months ago

Sure, sorry about that. I'm not really up to speed on the proper etiquette for these forums.