Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Odoo 12 Server Memory always increasing and never drops

Subscribe

Get notified when there's activity on this post

This question has been flagged
memory_usageodoo-server.confodoo12
1 Reply
11511 Views
Avatar
Paulo Matos

Hello gurus,

I have been fighting for months with tunning up my Odoo 12 server in regards to memory consumption.

I read a lot about it and made lots of tests without success.

My problem is, memory consumption is always increasing and never drops even if no one is using Odoo.

I am sure it is related to Odoo, because if I restart the service, memory is freed drastically.

Usually it begins at about 4%-5% and starts increasing (10, 15, 20… 50, 80…) as users starts using Odoo.

As per the CPU it is great. Sometimes it goes over 50% (on higher loads) but usually it is below 15% and I can see its consumption is being recicled/cleaned.

My Server
UBUNTU 18.04 – 4CPU / 8GB RAM
ODOO 12

odoo-server.conf


limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 300
limit_time_real = 600
limit_time_real_cron = -1
max_cron_threads = 2
workers=8

Tried to manage by changing “limit_memory_hard” and “limit_memory_soft” and use lower values but if the values are too low it raises an error:

"LongPolling Virtual memory limit reached"

What could be the problem and what are the advisable settings for this server specs?

Thank you very much
0
Avatar
Discard
Avatar
Hilar Andikkadavath
Best Answer

Lets recheck your memory handling calculations:

RAM: 8GB

Core: 4

So workers = (core * 2) + 1 = (4*2)+1(Cron Worker)

workers = 8+1=9

limit_memory_soft = 640 * 9 * 1024 * 1024 = 6039797760

limit_memory_hard = 768*9*1024*1024 = 7247757312

so your odoo conf must contain following calculations

limit_memory_soft = 6039797760
limit_memory_hard = 7247757312
workers = 9

Deatils:

  Multiprocessing options:
    --workers=WORKERS   Specify the number of workers, 0 disable prefork mode.
    --limit-memory-soft=LIMIT_MEMORY_SOFT
                        Maximum allowed virtual memory per worker, when
                        reached the worker be reset after the current request
                        (default 671088640 aka 640MB).
    --limit-memory-hard=LIMIT_MEMORY_HARD
                        Maximum allowed virtual memory per worker, when
                        reached, any memory allocation will fail (default
                        805306368 aka 768MB).
    --limit-time-cpu=LIMIT_TIME_CPU
                        Maximum allowed CPU time per request (default 60).
    --limit-time-real=LIMIT_TIME_REAL
                        Maximum allowed Real time per request (default 120).
    --limit-request=LIMIT_REQUEST
                        Maximum number of request to be processed per worker
                        (default 8192).



3
Avatar
Discard
Paulo Matos
Author

Hi Hillar,
Thank you very much for taking your time.
I will try with settings you sent me and keep you updated.
I thought increasing “memory limits” would make the system “recycle memory” later and I need it to be as fast as possible in order to release it.
I will keep you updated
Thank you once again

Paulo Matos
Author

@Hillar,

The week has started and now I will be able to track the settings more easily because I will have several users using the system.

For now I'm using the settings you sent me and just decided to reduce the "db_maxconn" a bit to 10 (before it was 15).

So far everything seems to be working fine, but I will continue to follow.

Thanks again and I will keep you updated.

Paulo Matos
Author

@Hillar
Thank you very much once again.

Two days and RAM is still below 50%.

Sometimes it goes over 60% but as expected, most of the time it’s below 50%.

Thank you very much

Tadeusz Jan Karpiński

It will be auto generated after starting odoo with config creation. Python odoo-bin -s

Obay Abdelgadir

I noticed that in the limit_memory_soft examply you multiplied by the number of workers 9. But this is not correct, the limit_memoy_soft and limit_memory_hard are per workers, thus you should not multiple by that, just 1024 * 1024 * SIZE_IN_MB

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Odoo Mail Sending Limit Solved
odoo12
Avatar
Avatar
Avatar
2
Dec 23
16217
(Document type: Invoice, Operation: write) - (Records: [], User: 2)
odoo12
Avatar
0
Oct 23
33
Error while importing data in Odoo12: An unknown issue occurred during import (possibly lost connection, data limit exceeded or memory limits exceeded)
odoo12
Avatar
Avatar
Avatar
Avatar
3
Oct 23
790
Remove duplicate record when importing data from excel to Odoo
odoo12
Avatar
Avatar
1
Oct 23
569
Multiple group on field Odoo12
odoo12
Avatar
Avatar
1
Aug 23
3273
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now