views:

45

answers:

3
+1  Q: 

Oracle 10g and PHP

HI I've converted a call center app from Oracle Forms into a web app using PHP

i am using oci_pconnect() to connect to the DB but we are seeing very high connections (in excess of 40 000 a day) because each user has a unique username and password. this is obviously killing the DB

any advice on best practices to minimize the impact or reuse connections?

A: 

Consider to use shared server, cman or move database to 11g and try DRCP.

iddqd
Thanks We plan to but the underlying DB application is not yet certified on 11g
Maxui
+2  A: 

The most common I've come across is to use a generic account for DB access and moving user authentication elsewhere (LDAP?). Although there are other approaches (as per iddqd's answer) you're still going to end up with a large connection pool at both ends, and though the performance will be improved, there's still an additional overhead each time a new session is created.

symcbean
A: 

oci_pconnect will create a new session with Oracle for each Oracle user and each web server process. So maximum number of session connections to Oracle will be (# of Oracle users in application) * (# of processes on each web server) * (oci8.max_persistent runtime parameter). You can limit this number by setting oci8.max_persistent = 1.

vls
I'll give that a bash Thanks
Maxui