跳至內容
選單
此問題已被標幟
2 回覆
5745 瀏覽次數

When running 2 Odoo 10 Servers (with Odoo CMS/Website) behind a load balancer connected to the same database server, odoo assets url (/web/content/%%/%.js, /web/content/%%/%.css) for the website is generated at every odoo service restart. The problem is if I restart the odoo service on server A, server B is not aware of the new asset url and keeps serving website pages with the old urls which does not work. And once we restart the odoo service on server B, server A keeps serving web pages with the urls that were generated when server A was restarted which does not work any longer.


How do we overcome this? Is there a configuration that needs to be done somewhere or Odoo does not support running website on multiple servers behind load balancer?



One thing I could able to understand the problem is when the request comes in the server A, it deletes all previously generated web bundle so the request coming on server B could not find previously generated web bundle which is obviously deleted (checked web bundle generated record deleted in ir.attachment location is the database mode type).

I tried to find on the forum as well as StackOverflow but could not find the relevant to this issue.
It will be very helpful if anyone could find the solution to this issue.

頭像
捨棄
最佳答案

I found the cause:

You need in each server/container the Odoo to be first of all in SAME PATH as on other servers, and  second  of  all  the code files that are used in bundles (less, css, js) need to have the exact same "last modified time" in all servers, because Odoo uses the full filename path plus the last modified date to generate a hash to see if the bundles need updating. If they are different in two servers (because you created  them at different times or  you  put  them  in  a  different  folder ) then the two Odoo's will always think the bundle is out of date and try every time  to regenerate it

頭像
捨棄
最佳答案

Hi,

Did you find a solution for this issue ?

I am facing exactly rhe same situation. I don't know how to fix it.

Thanks 

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
7月 20
2704
0
9月 17
2237
1
12月 16
6434
0
5月 25
77
2
5月 25
495