Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
5886 Tampilan

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.

Avatar
Buang
Jawaban Terbai

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

Avatar
Buang
Jawaban Terbai

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 

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
0
Jul 20
2797
0
Sep 17
2354
1
Des 16
6596
3
Jun 25
556
Configuring API Diselesaikan
1
Jun 25
380