php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1247 mysql_pconnect() makes new connection every time
Submitted: 1999-03-19 10:41 UTC Modified: 1999-03-19 15:30 UTC
From: glitter at chollian dot net Assigned:
Status: Closed Package: MySQL related
PHP Version: 3.0.7 OS: Solaris7 x86
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: glitter at chollian dot net
New email:
PHP Version: OS:

 

 [1999-03-19 10:41 UTC] glitter at chollian dot net
Specification:
Solaris7 x86 Pentium II 400Mhz with 128MB Main Memory
Apache WebServer 1.3.4
MySQL 3.22.19a
PHP-3.0.7

I found a problem on using mysql_pconnect().
It doesn't do described on manual.
When I try to connect my web page, it establishes new connection to MySQL every time.
So, If I try 30 times, there are 30 thread processes on 'mysqladmin processlist'.
Every process were slept, of course.

But, in the manual of mysql_pconnect(),
----
First, when connecting, the function would first try to find a (persistent) link that's already open with the same host, username and password. If one is found, an identifier for it will be returned instead of opening a new connection. 
----

I specified username and password in constant type. Then, how this can happen?
Please let me know asap.

MinSoon Park

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-03-19 15:30 UTC] sas
PHP3 tries to find such a connection on a per process base. A ps ax|grep httpd| wc -l will show you that there are at least the same number of Apache processes running.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 15:01:29 2024 UTC