PHP 4.0 Bug #5656 Updated: ifx_pconnect : E [SQLSTATE=IX 001 SQLCODE=-1829]
| From: | Bug Database | Date: | Thu, 20 Jul 2000 23:12:40 +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-25305@lists.php.net to get a copy of this message | ||
ID: 5656
Updated by: danny
Reported By: marsu@europe.com
Status: Open
Bug Type: Other
Assigned To:
Comments:
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
--
Full Bug description available at: http://bugs.php.net/version4/?id=5656