PHP 4.0 Bug #5656 Updated: ifx_pconnect : E [SQLSTATE=IX 001 SQLCODE=-1829]
| From: | sniper@php.net | Date: | Wed, 01 Nov 2000 17:08:21 +0000 |
| Subject: | PHP 4.0 Bug #5656 Updated: ifx_pconnect : E [SQLSTATE=IX 001 SQLCODE=-1829] | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-36679@lists.php.net to get a copy of this message | ||
ID: 5656
Updated by: sniper
Reported By: marsu@europe.com
Status: Feedback
Bug Type: Informix related
Assigned To: danny
Comments:
Previous Comments:
---------------------------------------------------------------------------
[2000-10-02 20:10:09] marsu@europe.com
Though this item was closed, I have to re-open it.
I still have the problem, which happens or doesn't happen, without any apparent reason.
We've opened a call with Informix support, which hasn't found anything yet.
We've tested 3.0.14 AND 4.0RC1 ; the trouble is still there.
We have tested Danny's proposed solution; the symptoms remain. Sometimes we can connect,
sometimes not.
Lastly I noticed that the "persistant" optin is set in httpd.ini file; so maybe the tests
made
with ifx_connect() instead of ifx_pconnect() may not mean anything.
Anyway, in the ifx_close() doc, I read that it doesn't close the persistant opened connections.
Is this true? (I also tested with no call to ifx_close().)
I can't find a solution to this. Did something change in the code of ifx_connect in the 4.02
PHP
release??? maybe it could help, but I can't do it without knowing this.
TIA,
marsu@europe.com
---------------------------------------------------------------------------
[2000-08-27 18:08:40] sniper@php.net
Danny: I assume you forgot to close this one?
If not please reopen with feedback.
--Jani
---------------------------------------------------------------------------
[2000-07-21 01:12:40] danny@cvs.php.net
It looks like you have run out of file descriptors.
There are 2 things to consider :
1. If you use ifx_connect() instead of ifx_pconnect(), it is imperative to insure that every page
does an ifx_close(), otherwise you will run out of connections (and file descriptors) very fast.
Check "error handling" code for missing ifx_close()!
2. If you use ifx_pconnect(), you should not use ifx_close() at all, or you will defeat the purpose
of persistent connections.
HOWEVER, when using ifx_pconnect(), you should never use the user id and password supplied by the
user for database connections, because persistent connections are identified by the combination
databasename/userid/password. So you could end up with hundreds or thousands of persistent
connections depending on the number of users. ALWAYS use the same (or a few) user id (s) to connect
to the database, and do your security and access permission checks on the application level (using
the user id and password supplied by the user). This will let you control the number of simultaneous
persistent connections to the database. Remember that each Apache process has it's own set of
connections !
Danny
--
---------------------------------------------------------------------------
[2000-07-18 07:19:25] marsu@europe.com
We have an Informix (7?) database on a separate machine, and PHP files on 3 other ones.
PHP is integrated as a module in Apache on our server.
The enterprise who made the developments are unable to solve the following problem, and were not
clever enough to ask for information, so I have to do it myself, though I don't have (yet?) all
the informations (especially conf files) I'd like to.
Our problem is, starting after a certain amount of time (or probably, connections), the
ifx_pconnect() (and equally the ifx_connect()) functions return the following message:
E [SQLSTATE=IX 001 SQLCODE=-1829]
and refuses the connection.
When we restart the Apache server (start+stop, not restart) it *may* get better, but it is not
always the case.
Our server may have up to 400 connections simultaneously, but the trouble appears before that limit
is reached. Even counting closed connections.
We have had these problems with PHP 3.?.?, and the upgrade to version 4 didn't make any
correction to this problem.
If you could help us on this, it'd be very helpful!!
Please do not hesitate to ask for some more information, as I know there is not enough here --but I
don't have much more yet.
The services we provide may suffer from this problem, and as we pay the internet users for this,
this would be a sad story for free internet usage!
Best regards, and thanks for the amazing wonderful work already done! I'll contribute asa
I'll have more time for this.
Sorry for my bad english!
Dominique -- RDBMS manager and software engineer
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=5656