Odoo Help


How to know how many users are currently logged?

Dago Gallo
on 10/29/15, 1:17 PM 1,937 views

--> I got this error in the odoo server:

QWebException: FATAL: sorry, too many clients already

--> And postgres server prints the following error: 

CST FATAL: sorry, too many clients already.

Anybody here knows what is the solution??




| 6 5 7
Lodz, Poland

On 10/29/15, 2:06 PM

1. PostgreSQL has configuration parameter: max_connections - probably you need increase this value (but this is the server performance dependency).

2. Odoo has other similar config parameter  db_maxconn (the postgresql parameter is important).

yes, you right, but I need the formula to calculate the maxium connections that I need... I got this processor: cpu description: CPU product: Intel(R) Xeon(R) CPU E3-1240 v3 @ 3.40GHz vendor: Intel Corp. physical id: 400 bus info: cpu@0 version: Intel(R) Xeon(R) CPU E3-1240 v3 @ 3.40GHz slot: Proc 1 size: 1666MHz capacity: 1666MHz width: 64 bits clock: 100MHz with 8GB RAM... so I need to know the formula to calculate the maxium connections. Thanks

Dago Gallo
on 11/1/15, 12:14 PM

My suggestion, use pgtune: http://pgtune.projects.pgfoundry.org/

on 11/1/15, 12:27 PM

Dago Gallo, the formula is here:

(1 + workers + max_cron_threads) * db_maxconn < max_connections

source: http://odoo-development.readthedocs.io/en/latest/admin/db_maxconn.html

on 5/17/18, 6:03 AM

Axel Mendoza

--Axel Mendoza--
| 7 8 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

Axel Mendoza
On 10/29/15, 3:56 PM

I have faced this issue until I switch to pgbouncer as a connection pooling and configured odoo to connect to postgres using pgbouncer port.Try it

What is pgbouncer?... Can you tell me more about it please?

Dago Gallo
on 11/1/15, 12:07 PM

From the docs: https://pgbouncer.github.io/usage.html#quick-start

pgbouncer is a PostgreSQL connection pooler. Any target application can be connected to pgbouncer as if it were a PostgreSQL server, and pgbouncer will create a connection to the actual server, or it will reuse one of its existing connections.

The aim of pgbouncer is to lower the performance impact of opening new connections to PostgreSQL.

In order not to compromise transaction semantics for connection pooling, pgbouncer supports several types of pooling when rotating connections:

Session pooling
Most polite method. When client connects, a server connection will be assigned to it for the whole duration the client stays connected. When the client disconnects, the server connection will be put back into the pool. This is the default method.

Transaction pooling
A server connection is assigned to client only during a transaction. When PgBouncer notices that transaction is over, the server connection will be put back into the pool. Statement pooling

Most aggressive method. The server connection will be put back into pool immediately after a query completes. Multi-statement transactions are disallowed in this mode as they would break.

Axel Mendoza
on 11/1/15, 12:13 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 10/29/15, 1:17 PM
Seen: 1937 times
Last updated: 11/2/15, 3:32 AM