Hi.

        I use persistent connections opened from php scripts. For what I read
in the manual, when a client try to connect to the same server, same
database , same user, same password, if a persistent connection is
already open, it should use that mysql link, never open another
persistent connection.

>From my office, I execute the php script a couple of times from 2 or 3
different computers and this is what I get running mysqladmin:

+------+--------+-----------+--------------+---------+------+-------+------------------+
| Id   | User   | Host      | db           | Command | Time | State |
Info             |
+------+--------+-----------+--------------+---------+------+-------+------------------+
| 1929 | delfos | localhost | delfos_hotel | Sleep   | 221  |      
|                  |
| 1931 | delfos | localhost | delfos_hotel | Sleep   | 13   |      
|                  |
| 1932 | delfos | localhost | delfos_hotel | Sleep   | 46   |      
|                  |
| 1934 | delfos | localhost | delfos_hotel | Sleep   | 32   |      
|                  |
| 1937 | delfos | localhost | delfos_hotel | Sleep   | 159  |      
|                  |
| 1939 | delfos | localhost | delfos_hotel | Sleep   | 23   |      
|                  |
| 1941 | delfos | localhost | delfos_hotel | Sleep   | 55   |      
|                  |
| 1942 | delfos | localhost | delfos_hotel | Sleep   | 50   |      
|                  |
| 1947 | root   | localhost |              | Query   | 0    |       |
show processlist |
+------+--------+-----------+--------------+---------+------+-------+------------------+

I have 9 more databases which are used the same way, so, I have
generally 80 mysqld processes running in my poor little pentium
processor, each one of them uses the 4.1% of my RAM.

How can I solve this problem?? (without using no persistent
connections).




I'm using RedHat Linux 6.2

mysql:  
        /usr/local/mysql/bin/mysqladmin  Ver 8.0 Distrib 3.22.32, for
pc-linux-gnu on i686
        TCX Datakonsult AB, by Monty
        Server version          3.22.32
        Protocol version        10
        Connection              Localhost via UNIX socket


httpd:
        Server version: Apache/1.3.14 (Unix)
        Server built:   Nov  8 2000 11:11:59
        Server compiled with....
         -D EAPI
         -D HAVE_MMAP
         -D HAVE_SHMGET
         -D USE_SHMGET_SCOREBOARD
         -D USE_MMAP_FILES
         -D USE_FCNTL_SERIALIZED_ACCEPT
         -D HTTPD_ROOT="/usr/local/apache"
         -D SUEXEC_BIN="/usr/local/apache/bin/suexec"
         -D DEFAULT_PIDLOG="logs/httpd.pid"
         -D DEFAULT_SCOREBOARD="logs/httpd.scoreboard"
         -D DEFAULT_LOCKFILE="logs/httpd.lock"
         -D DEFAULT_XFERLOG="logs/access_log"
         -D DEFAULT_ERRORLOG="logs/error_log"
         -D TYPES_CONFIG_FILE="conf/mime.types"
         -D SERVER_CONFIG_FILE="conf/httpd.conf"
         -D ACCESS_CONFIG_FILE="conf/access.conf"
         -D RESOURCE_CONFIG_FILE="conf/srm.conf"


php
        PHP Version 4.0.4 
        Build Date Jan 29 2001 
        Configure Command './configure' '--with-mysql=/usr/local/mysql'
'--with-apxs=/usr/local/apache/bin/apxs' 
        Server API Apache 
        Virtual Directory Support disabled 
        ZEND_DEBUG disabled 
        Thread Safety disabled 

        php-mysql:
                Active Persistent Links 8 
                Active Links 8 
                Client API version 3.22.32 




Thanks in advance.

Sam.

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to