I've some php application working with oracle XE with oci8 driver. Application works fine, but with time number of running oracle processes grows and when it reaches 100, it is impossible to to backup:
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-00020: maximum number of processes (100) exceeded
To do a backup I need to restart oracle.
What is interesting, number of processes doesn't affect php application. I think php can reuse existing processes. It is possible that RMAN will reuse existing processes?
Or is there any way to close unneeded processes ?
>> when it reaches 100, it is impossible to to backup
And impossible to do lots of other things as well.
>> php can reuse existing processes.
Maybe. How about checking that the code closes a connection when its done, that might be a better fix instead of having an excessive number of active connections. The processes parameter could be increased, but that just means it will take longer for the instance to have its available processes consumed.
Fix the problem, not the problem symptoms.
With 11g XE, use DRCP connection pooling for your PHP connections. See The Underground PHP and Oracle Manual
Use non-DRCP connections for other jobs.
It sounds like you are using persistent PHP connections. This is good for performance but if you have a large number of PHP/Apache processes you will reach the DB limits, as you've found. You can tune the number of connections to suit the largest possible number of mid-tier processes in your system. Do this with the 'processes' parameter in the DB. See the "Configuring the Database For Testing" section in the testing chapter of The Underground PHP and Oracle Manual. You could also reduce the number of Apache processes that start, or be more aggressive in expiring them.
For follow up PHP questions, use the PHP OTN forum.