Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2002
    Location
    San Francisco, CA
    Posts
    441

    Unanswered: FATAL: Sorry, too many clients already

    I am getting the following error:
    FATAL: Sorry, too many clients already
    I know why this is caused - because I am using all of the default 64 connections.

    This is happening because I am hitting the server hard to do load testing.

    What my problem is however, is that they are not "releasing". The server still says this ten or twenty minutes later - even with no one using it.

    Now - how do I solve this?

    Also, how to I better pool database connections in PHP/Postgres?


  2. #2
    Join Date
    Sep 2001
    Location
    Vienna
    Posts
    400

    connections

    do you use persistent connections?

    I have only 10 persistent connections open
    and it runs without problems
    http://www.postgresql.org
    --Postgresql is the only kind of thing--

  3. #3
    Join Date
    Feb 2002
    Location
    San Francisco, CA
    Posts
    441
    I think so. But I probably am not managing them correctly hence asking about pooling? any ideas?

  4. #4
    Join Date
    Jan 2004
    Posts
    26
    just do not open persistent connections. In php help there is a big explanation of what they are and how to work with them.

    I'm using postgre 7.2.1 and PHP 4.2.1 and I open the connection using a class. When I redirect to a diferent location I've check the conection and if it's still alive... i've just kill it.
    do not just use header to redirect from php. Use a function that first kill the connection killing the object, then redirect using header. So when your page it's reloaded, it makes the connection again. Also, you can check it before.

Posting Permissions

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