PHP, RAC, OCI8 Slow trying to set up HA
Hello,
I am trying to set up a php application to connect to an Oracle 11g 2 node RAC. I have set it up with PHP 5.2.8 and 5.2.10.
php 5.2 comes with the oci8 1.2.5, and when I was running that version connections were quick and responsive. My test script which forks 10 "users" and connects to the web app 10 times each would complete in less than 20 seconds, however, when ever there was a db failure, some of the connections would, presumably because they are waiting for a connection timeout before letting go. needless to say this was counter productive.
I upgraded the oci8 driver to 1.3.5, and the failovers went much smoother, the problem was when I started load testing, I realized something was not right. The same set of tests that ran in under 20 seconds now took over 6 minutes to complete. I have absolutely no idea where to start with this. This is my first project working with oracle, so I am not really familar with the connections, and failover.
Some of the details are as follows, and if there is additional info that would be helpful, please let me know, and I will post what I can.
php 5.2.8
oci8 1.3.5
oracle rac 11g
oracle instand client 11.1
php.ini
extensions=oci8.so
oci8.events=On
tnsnames.ora
RAC=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node-vip-02)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = node-vip-01)(PORT = 1521))
(LOAD_BALANCE = no)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac_service)
(FAILOVER_MODE =
(TYPE = select)
(METHOD = basic)
(RETRIES = 1)
(DELAY = 1)
)
)
)
Thank you,
B