[opencms-dev] Performance Tuning Questions
Brett Sheeran
brett.sheeran at gmail.com
Mon Jul 20 03:35:21 CEST 2009
Hi,
Thanks to Chris Christoph for suggesting max_allowed_packet should be
64M. Also, a *huge* thankyou to Christian Steinert for taking the time
to write such a deeply detailed and very informative explantion on
OpenCMS caching. I am grateful.
Unfortunately, after extended periods under load, I am experiencing
SQL errors and what appears to be thousands of leaking/lost database
connections . Can anyone tell me what I can do about these issues
please? Details as follows.
I simulated 1000 test users each loading a page once every 15 seconds.
After several hours, page errors started to occur and OpenCMS
generated SQL errors similar to this (abridged) message:
-----
org.opencms.db.CmsDbSqlException: Error reading resource from path
"/system/modules/com.company.context/resources/file.xml".
<snip/>
Caused by: org.opencms.db.CmsDbSqlException: An SQL error occurred
when executing the following query:
com.mysql.jdbc.PreparedStatement at 11ed
<snip/>
Caused by: com.mysql.jdbc.CommunicationsException: Communications link
failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.io.EOFException
MESSAGE: Can not read response from server. Expected to read 4 bytes,
read 0 bytes before connection was unexpectedly lost.
STACKTRACE:
java.io.EOFException: Can not read response from server. Expected to
read 4 bytes, read 0 bytes before connection was unexpectedly lost.
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1997)
<snip/>
** END NESTED EXCEPTION **
<snip/>
Last packet sent to the server was 0 ms ago.
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2622)
<snip/>
-----
I ran the following line of code:
cmsSqlManager.getActiveConnections("opencms:default");
The number of active connections was a *staggering* 3691. Usually,
there are only 0, 1 or 2 active connections. Days after halting the
performance tests, the number of active connections has not come down.
Since there is currently no load on my system (and presumably no
*real* active connections), I presume these connections are in fact a
massive leak.
Incidentally, I am not querying the database directly.
Thank you.
Regards Brett S
More information about the opencms-dev
mailing list