Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Posts
    1

    Unanswered: Understanding max_connections

    Hello.

    I started to work in a new job.
    Here we have an Apache with Web pages in php, and a postgres database to record the sessions (I think is phplib, the table is active_sessions).

    My question is, what really means the "max_connections" variable in postgresql.conf. ?

    The session counts since the user log into the web and log out, or the session is only when the user runs a query, and after the query ends, the session is terminated ?

    Because the problem I have sometimes is "Warning: pg_pconnect() unable to connect to PostgreSQL server: Sorry, too many clients already in /var/www/php/db_pgsql.inc on line 48"

    I run "ps ax | grep postgres | wc -l
    and I have 32 connections.
    I know the limit is 32, but I dont know if it has relation with the max_connections.

    I really hope someone could understand my point. Because my enslish is very poor, plus I dont know a lot of postgres.

    Thanks in advance.

    sith

  2. #2
    Join Date
    Oct 2003
    Posts
    12
    Yes it has a relation , TRY increasing the value of max_connection in that file i.e. postgresql.conf file. If have too many connections, you should consider using a connection pool .

  3. #3
    Join Date
    Nov 2003
    Location
    Poland
    Posts
    7

    Re: Understanding max_connections

    Not that easy go to http://www.varlena.com/varlena/Gener...erf.html#intro
    and check for yourself what and how to do with this problem , you may face recompilation of kernel on your server , this is what i had to do max connection i set on 100 and its working fine (but only after setting semafores and recompiling the kernel)

    have fun

    Originally posted by sith
    Hello.

    I started to work in a new job.
    Here we have an Apache with Web pages in php, and a postgres database to record the sessions (I think is phplib, the table is active_sessions).

    My question is, what really means the "max_connections" variable in postgresql.conf. ?

    The session counts since the user log into the web and log out, or the session is only when the user runs a query, and after the query ends, the session is terminated ?

    Because the problem I have sometimes is "Warning: pg_pconnect() unable to connect to PostgreSQL server: Sorry, too many clients already in /var/www/php/db_pgsql.inc on line 48"

    I run "ps ax | grep postgres | wc -l
    and I have 32 connections.
    I know the limit is 32, but I dont know if it has relation with the max_connections.

    I really hope someone could understand my point. Because my enslish is very poor, plus I dont know a lot of postgres.

    Thanks in advance.

    sith

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •