It did not take long before we noticed a significant variation in the time it took to serve Apex pages from the database. Most of the time, pages were served quickly enough, but at uneven intervals pages would just take forever to load. It seemed as if the underlying database or webserver/XDB session was timing out.
After some head-scratching, googling, and experimentation, the following two configuration changes fixed the problem. Page performance is now consistently excellent, and we do not experience timeouts anymore.
- Increase the XDB session-timeout parameter (I changed it from the default of 6000 [1 minute] to a new value of 30000 [5 minutes].
- Increase the shared_servers database parameter (I changed it from the default of 1 to a new value of 5).
Note: I changed both these settings at the same time, so I did not measure the effect of each individually. I suspect the shared_servers database setting is the most important of the two.
Detailed instructions follow:
Changing the session-timeout parameter in XDB
Connect as SYSDBA and run the following:
declare l_newconfig xmltype; begin select updatexml (dbms_xdb.cfg_get(), '/xdbconfig/sysconfig/protocolconfig/httpconfig/session-timeout/text()', 30000) into l_newconfig from dual; dbms_xdb.cfg_update (l_newconfig); commit; end; /
Note:
Changing the shared_servers database parameter
Connect as SYSDBA and run the following:
SQL> alter system set shared_servers = 5 scope=both; System altered. SQL> alter system register; System altered.
This will create more background sessions to handle the Apex page requests served through XDB.
3 comments:
Shouldn't that statement include SCOPE=BOTH, as in:
ALTER SYSTEM SET SHARED_SERVERS=5 SCOPE=BOTH
This way, the setting will persist.
Joel
I got the same performance issue ( see http://forums.oracle.com/forums/thread.jspa?threadID=947071&tstart=30 )
and I try your solution but now I am not on my business lan.
It's seems to work on my laptop so my problem seems to be on the use of database link between the server where is ApEx and the production server.
Can you help me to localize my problem ?
Thanks
JM Plancade
plancade@mls.nc
"alter system register" will make those xdbconfig.xml settings active, without the need to restart.
Post a Comment