Postgres FATAL;Too many clients already

Help
2012-06-05
2013-03-08
  • Johnson Joseph
    Johnson Joseph
    2012-06-05

    Hello Community

    Adempiere 3.70.LTS/ Postgres 9.0

    We get the following message  FATAL; sorry, too many clients already in Postgress
    New users are unable to login Adempiere Server

    Actually less than 25 users connected to the Server 

    Environmwnt details:-

    Adempiere version  : 3.7.0LTS
    Postgresql              : 9.1
    serv                    : Windows Server 2010 / 32 GB RAM
    Client Computers         : Windows XP / 7
    Max_connections  = 100 /Postgres

    Kindly suggest me a solution

    Regards
    Johnson

     
  • karsten-thiemann
    karsten-thiemann
    2012-06-05

    Hi Johnson,

    you need to higher the max_connections. ADempiere will open more than one connection/user so I guess that is your limiting factor.

    Best regards,
    Karsten

     
  • Johnson Joseph
    Johnson Joseph
    2012-06-05

    Hello Karsten

    I will definetly increase the connections. I did not do this as I suspect a database perfomance issue.

    Is Adempiere close the connection while the users sign off. I wonder though the number of users logged are leas than 25, how the database server shows 'too many clients'

    I would like to know how Adempiere treats the connectivity mechanism

    Kinldy share oyur knowledge

    Thanks
    Johnson

     
  • Johnson Joseph
    Johnson Joseph
    2012-06-09

    Hello Karsten

    I set max connections =300. For few days I did not see any problem. Today I get the same problem.

    Can anyone help me on this

    Thanks
    Johnson

     
  • Thomas Bayen
    Thomas Bayen
    2012-06-10

    You can see information about active connections with

    SELECT * FROM pg_stat_activity;
    

    You see this table in PgAdmin3 in the "statistics" tab if you choose your server's item in the tree. With that you can see which client uses how many connections. For me it seems that every running adempiere instance takes 4 connections.

    If this does not help you it would be interesting to see the stacktrace of your error. It should contain the exact postgres error message. Perhaps googling this or asking in postgres forums may help.

    Thomas

     
  • karsten-thiemann
    karsten-thiemann
    2012-06-11

    Hi,

    do you have any customizations? It sounds like some database connections are not closed correctly. As Thomas said the pg_stat_activity should show you the active queries. This should give you a hint where the problem is located.

    Best regards,
    Karsten

     

  • Anonymous
    2012-11-06

    hi Johnson,

    Could you able to resolve this issue, If yes please tell me the procedure you followed ,  as i am also facing this kind of issue.

    Best Regards
      Anura

     
  • Jubin Philip
    Jubin Philip
    2012-11-07

    Hi Anura,

    You can increase your max_connections in postgreSQL. This will solve the issue.

    Regards,

    Philip