Sunday 19 June 2011 3:24:54 pm
Hi By default, eZ opens a database connection per page. As soon as the page is done, the connection is closed (ie: connections are not persistent). You can change the configuration to have eZ use persistent databaseconnections. This way the same connection can be reused by page B after page A has finished. Please note that in general using persistent connections has a bit of the opposite effect of what you want to achieve here (reduce the number of connections opened to the db at the same time), as if you have 1000 concurrent apache processes serving a page at the same time, what you get is 1000 db connections that will persist, ie. stay open for a while. At least in non-persistent mode they will be closed very quickly. Do note also that this is not by design of eZ Publish: this is the way that php works (ie. there is not a real db connection pool that can be managed in explicit ways). To limit the number of db connections, it is recommended to lower the number of Apache processes that can be active at any given time (MaxClients in httpd.conf). There are good chances that with 10000 running Apache processes your webserver is swapping heavily anyway ( since eZP uses 10MB of ram per page in the best case scenario, 10000 pages being served means 100GB ram installed on the server plus space for OS and buffers/cache). And the swapping can be the real cause for slowness, rather than problems with the db. Last but not least, two things you can do to tune oracle for a massive number of connections: - use the MTS server config (old school trick) - use the DRCP config (only if you have an oracle 11db) both of those are done in oracle configuration (server-side or client-side), they do not involve changes in eZP
Principal Consultant International Business
Member of the Community Project Board
|