Contributors mailing list archives

Browse archives


Re: eCommerce checkout runs out of workers and Odoo dies

Therp, Tom Blauwendraat
- 10/05/2023 12:03:40

Hi Daniel

I don't know if it helps in your case, but we had a similar problem where the root cause was the invoice sequence number being set to "nogap" (as it should, in fact). This makes e-commerce clients have to wait on each other if both confirm at the same time. While waiting, both of them occupy workers, of course, so if you have only 2 workers and the third client comes to browse the shop he will not even get any response because he will have to wait for a free worker. Since ours was a very heavy-traffic e-commerce, this happened often even with many workers enabled, and we ended up refactoring the process so that the order is marked for confirmation in real-time (quick), but the actual invoice generation and sending by email (slow and prone to DB conflict) is delegated to a queue job and done sequentially.


On 5/9/23 19:41, Daniel Reis wrote:

We stumbled into an Odoo problem, when trying to complete several eCommerce checkouts at the same time, with a low number of workers available. For example: you have two workers, and you have two or more shoppers completing their payment at the exact same time.

We traced this to the report generation happening when closing a Sales Order, and found this relevant Issue:

Long story short -
running the reports triggers Odoo requests to get the HTML assets needed,
these triggers the need for more workers to serve the assets,
but no more workers are available and the Odoo server dies (with an "existing gracefully" message and no further explanation!).

The recommended solution from Odoo is to have the assets cached at the Nginx level, both for static files and for the asset bundles.
In this case this is a K8's deployment and we're using Ingress instead of Nginx, and are working through the particular configuration needed to achieve this effect.

I found it could be interesting to share this, and maybe get other points of view or reports from other people having faced the same problem.

Thank you


M: +351 919 991 307
A: Avenida da República 3000, Estoril Office B, 3º Escr.34, 2649-517 Cascais

Post to: