{"id":17272,"date":"2026-01-29T18:12:55","date_gmt":"2026-01-29T12:42:55","guid":{"rendered":"https:\/\/www.skynats.com\/?p=17272"},"modified":"2026-01-29T18:13:02","modified_gmt":"2026-01-29T12:43:02","slug":"how-to-install-pgbouncer-to-improve-odoo-performance","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/how-to-install-pgbouncer-to-improve-odoo-performance\/","title":{"rendered":"How to Install PgBouncer to Improve Odoo Performance"},"content":{"rendered":"\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-introduction\"><strong>Introduction<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Odoo applications often face performance issues when many users access the system at the same time. One common reason is too many database connections to PostgreSQL. Install PgBouncer for Odoo Performance to use this lightweight connection pooler that helps Odoo reuse database connections instead of opening new ones every time. This significantly improves performance and stability.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-why-pgbouncer-for-odoo\"><strong>Why PgBouncer for Odoo?<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PostgreSQL has a limited number of connections<\/li>\n\n\n\n<li>Each Odoo worker uses one database connection<\/li>\n\n\n\n<li>High traffic can quickly exhaust the limit<\/li>\n\n\n\n<li>PgBouncer reduces connection overhead by reusing a small set of connections<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-step-1-install-pgbouncer\"><strong>Step 1: Install PgBouncer<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">On Ubuntu server, install PgBouncer using:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install pgbouncer<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\"><strong>Step 2: Configure PgBouncer<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Edit the PgBouncer configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/pgbouncer\/pgbouncer.ini<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-basic-configuration\"><strong>Basic Configuration<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;databases]\nodoo_db = host=127.0.0.1 port=5432 dbname=odoo_db<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;pgbouncer]\nlisten_addr = *\nlisten_port = 6432\n\nauth_type = md5\nauth_file = \/etc\/pgbouncer\/userlist.txt\n\npool_mode = transaction\nmax_client_conn = 500\ndefault_pool_size = 20<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Save the file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\"><strong>Step 3: Configure Odoo to Use PgBouncer<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Edit odoo.conf and update the database port:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>db_host = 127.0.0.1\ndb_port = 6432\ndb_user = odoo\ndb_password = your_password<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Restart Odoo after making changes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\"><strong>Step 4: Restart PgBouncer<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart pgbouncer\nsudo systemctl enable pgbouncer<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\"><strong>Step 5: Verify PgBouncer Is Working<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Connect to PgBouncer admin database:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>psql -p 6432 -U postgres pgbouncer<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SHOW POOLS;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If PgBouncer is working, you will see active and idle connections.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\" id=\"h-conclusion\"><strong>Conclusion<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">PgBouncer is an easy and effective way to improve Odoo performance by reducing database connection overhead. With minimal configuration, you can make your Odoo system more stable and scalable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you need expert help with How to Install PgBouncer to Improve Odoo Performance, Skynats is here to support you. Our experienced engineers provide reliable <a href=\"https:\/\/www.skynats.com\/devops-support\/\" type=\"link\" id=\"https:\/\/www.skynats.com\/blog\/devops-support\/\">DevOps Support Services<\/a> and <a href=\"https:\/\/www.skynats.com\/server-management\/\" type=\"link\" id=\"https:\/\/www.skynats.com\/blog\/server-management\/\">Server Management Services<\/a> to optimize Odoo, fine-tune PostgreSQL, and ensure peak application performance. Contact Skynats today for scalable, secure, and hassle-free Odoo optimization.<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Odoo applications often face performance issues when many users access the system at the same time. One common reason is too many database connections to PostgreSQL. Install PgBouncer for Odoo Performance to use this lightweight connection pooler that helps Odoo reuse database connections instead of opening new ones every time. This significantly improves performance [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1064,1231,1230,315,302,851],"class_list":["post-17272","post","type-post","status-publish","format-standard","hentry","category-blog","tag-devops-support-services","tag-install-pgbouncer","tag-odoo-optimization","tag-postgresql","tag-server-management-services","tag-ubuntu-server"],"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/17272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=17272"}],"version-history":[{"count":2,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/17272\/revisions"}],"predecessor-version":[{"id":17274,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/17272\/revisions\/17274"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=17272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=17272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=17272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}