[Pgpool-general] pgPool not starting - Debian package

Tatsuo Ishii ishii at sraoss.co.jp
Sun Mar 11 05:49:30 UTC 2007


> Hello,
> 
> Thank you for your hard work on pgpool. 

You are welcome.

> I have been waiting for a connection poll for years. I wonder why pgpool
> is not included in PostgreSQL by default. It should be included in
> PostgreSQL backend, and it would be the choice of administrators to use
> it or not.
> 
> I write this message on the list as I notice that Peter Eisentraut will
> read this email. Hi Peter! I hope that you are doing well.
> 
> I have two questions:
> 
> 1. Need to reduce memory footprint
> 
> Both Apache and PostgreSQL are installed on the same machine.
> The server is sometimes under a 400 users load.
> 
> Under certain circumstances ... the server swaps and both PostgreSQL and
> Apache become VERY slow. I would like to use some kind of a pre-fork
> architecture, where I am sure that PostgreSQL will only use a determined
> maximum memory. Normaly, the connection pool is the work of PHP
> pconnect. But some strange reasons I get more and more processes and the
> machine stops responding.

When you use pgpconnect(), you can calculate the max number of
PostgreSQL backend processes by:

x: the number of apache's child processes
y: the number of kind of user/database pairs in your PHP application

the number of PostgreSQL backend processes = x * y

For example, if your appache setting allows up to 150 children and you
PHP apps use foo1/bar1 and foo2/bar2 user/database pair, the number of
PostgreSQL backend processes will reach up to 150*2 = 300.

Moreover, since the standard php.ini file allows non persistent,
pgconnect() connections, you will even get more connections if some of
your apps use pgconnect().

> Do you think that pgpool is some kind of connection pool OR is it
> defenitely the work of PHP pConnect functions.

pgpool is different from pgpconnect(). pgpool can limit the number of
PostgreSQL processes by setting num_init_children parameter in
pgpoo.conf. So if you want to allow up to 100 connections with
PostgreSQL, you could just set 100 to num_init_children. Note that I
do not reccommend to use pgpconnect() and pgpool together.
--
Tatsuo Ishii
SRA OSS, Inc. Japan

> My system is a Debian SID on a bi-Xeon, 1Gb RAM, with SATA drives and
> PostgreSQL 8.1. I plan to upgrade to PostgreSQL 8.2
> 
> 2. pgpool Debian package:
> 
> * On my PC, I simply enter "apt-get install pgpool" and pgpool will
> install and start with a default (suitable) configuration file. I may
> then stop/restart. Cool.
> 
> * After testing on my PC, I log in my internet server. I type apt-get
> install pgpool. And ...
> 
> [root at geneve][502][~] #apt-get install pgpool*
> Lecture des listes de paquets... Fait
> Construction de l'arbre des dépendances... Fait
> Note, sélectionne pgpool pour l'expression rationnelle « pgpool* »
> Les paquets supplémentaires suivants seront installés :
>   pgpool
> Les NOUVEAUX paquets suivants seront installés :
>   pgpool
> 0 mis à jour, 1 nouvellement installés, 0 à enlever et 230 non mis à
> jour.
> Il est nécessaire de prendre 97,9ko dans les archives.
> Après dépaquetage, 266ko d'espace disque supplémentaires seront
> utilisés.
> Souhaitez-vous continuer [O/n] ? O
> Réception de : 1 http://ftp.fr.debian.org unstable/main pgpool 3.2-1
> [97,9kB]
> 97,9ko réceptionnés en 0s (329ko/s)
> Sélection du paquet pgpool précédemment désélectionné.
> (Lecture de la base de données... 48140 fichiers et répertoires déjà
> installés.)Dépaquetage de pgpool (à partir
> de .../pgpool_3.2-1_amd64.deb) ...
> Paramétrage de pgpool (3.2-1) ...
> Starting pgpool: pgpool failed!
> invoke-rc.d: initscript pgpool, action "start" failed.
> dpkg : erreur de traitement de pgpool (--configure) :
>  le sous-processus post-installation script a retourné une erreur de
> sortie d'état 1
> Des erreurs ont été rencontrées pendant l'exécution :
>  pgpool
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> [root at geneve][503][~] #dpkg --remove pgpool
> (Lecture de la base de données... 48153 fichiers et répertoires déjà
> installés.)Suppression de pgpool ...
> Stopping pgpool: pgpool.
> [root at geneve][504][~] #apt-get install pgpool
> Lecture des listes de paquets... Fait
> Construction de l'arbre des dépendances... Fait
> Les NOUVEAUX paquets suivants seront installés :
>   pgpool
> 0 mis à jour, 1 nouvellement installés, 0 à enlever et 230 non mis à
> jour.
> Il est nécessaire de prendre 0o/97,9ko dans les archives.
> Après dépaquetage, 266ko d'espace disque supplémentaires seront
> utilisés.
> Sélection du paquet pgpool précédemment désélectionné.
> (Lecture de la base de données... 48144 fichiers et répertoires déjà
> installés.)Dépaquetage de pgpool (à partir
> de .../pgpool_3.2-1_amd64.deb) ...
> Paramétrage de pgpool (3.2-1) ...
> Starting pgpool: pgpool failed!
> invoke-rc.d: initscript pgpool, action "start" failed.
> dpkg : erreur de traitement de pgpool (--configure) :
>  le sous-processus post-installation script a retourné une erreur de
> sortie d'état 1
> Des erreurs ont été rencontrées pendant l'exécution :
>  pgpool
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> 
> BUT if I run pgpool using a command line, everything is Okay.
> Peter, how can I submit information to help understanding the problem?
> 
> Kind regards,
> Jean-Michel Pouré
> 
> 
> _______________________________________________
> Pgpool-general mailing list
> Pgpool-general at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pgpool-general


More information about the Pgpool-general mailing list