Hello,
I have tried many avenues to solve this issue but have been unsuccessful. I'm hoping someone will know what I did wrong.
We have a 2CPU, 2GB server with a custom module called "Kitchen Screen" that syncs orders between our kitchen and cashier. Usually we would have 4 sporadic users and at most 2 persons using the system at the same time.
We initially ran on multi-threading but kept hitting our memory ceiling so we switched to multiprocessing and that seemed to solve the memory issues.
We then started to see loading time increase more and more, it now takes about 5 seconds for an operation to post in Odoo-server.log and the POS seems to display loading screens frequently and randomly.
I noticed a few idle connections were taking a lot of memory so I installed and configured pg_bouncer, but that didnt solve the problem.
I'm starting to think that it could be a postgresql, configuration issue or a database issue. the bus_bus table on our prod database (the slow one), is >600mb, while our test database is much lighter, 150mb, and has no loading issues whatsoever.
table_schema | table_name | total_size | data_size | external_size
--------------+-------------------+------------+-----------+---------------
public | bus_bus | 696 MB | 496 kB | 695 MB
public | ir_translation | 22 MB | 7488 kB | 15 MB
public | pos_order_line | 8192 kB | 6496 kB | 1696 kB
public | stock_move | 7352 kB | 2400 kB | 4952 kB
public | mail_message | 7160 kB | 3240 kB | 3920 kB
public | pos_order | 6312 kB | 3760 kB | 2552 kB
public | ir_model_data | 3976 kB | 1944 kB | 2032 kB
public | pos_payment | 3848 kB | 2744 kB | 1104 kB
public | account_move_line | 3760 kB | 1040 kB | 2720 kB
public | stock_move_line | 3448 kB | 1872 kB | 1576 kB
Thanks,