Hello
I have a big problem right now: my Cocoon MySql connections have
started to fail randomly, and when they do they bring down all pages
currently being generated.
My gut feeling is that it's a synchronization problem, some race
condition in Cocoon or in the Mysql connector. This is because the
failures happen on random pages, that usually render correctly, and
also because the higher the concurrency of http requests, the higher
the rate of failure. Apparently I didn't stress-test the server
configuration with a high enough concurrency, before going online.
Here is what I see in the logs:
SQLTransformer.Query: Failed to execute query [...]
com.mysql.jdbc.CommunicationsException: Communications link failure
due to underlying exception:
java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at
com
.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:
113)
...
(other mysql jdbc classes follow, then excalibur, then the
SQLTransformer)
Looking at a network dump, I can see a series of Mysl protocol QUIT
messages that tear down all tcp connections to the Mysql server. It
happens simultaneously on ALL tcp connections and I can see the Jdbc
connector sending appropriate QUIT messages to the server, so it's not
a hard connection reset, coming from the network stack. The Mysql
server is on localhost, so it's not a network problem.
As soon as this happens, all pages being worked on at the same time
fail with such messages as:
SQLTransformer.Query: Failed to execute query [...]
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No
operations allowed after connection closed.
or:
ErrorHandlerHelper: Failed to process pipeline
java.lang.NullPointerException
at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java:966)
...
or other such NPE inside the JDBC driver, on lines where the driver is
trying to use its own iternal connection object (which now appears to
be null.)
After that, the database connections are reopened and Cocoon proceeds
normally, but after a few of these error iterations it all hangs.
(Memory leak? I don't know.)
I'm using Cocoon 2.1.10 and 2.1.11 (same results) and MySql connector
3.1.14 and 5.0.6 (same results.) I'm using SQLTransformer with
prepared statements (<sql:in-parameter>) and a few custom actions of
mine which use JDBI prepared statements. The server runs Debian
stable with its latest Sun Java 1.5.0 and Mysql 5.0.32 packages.
I cannot use the 5.0.8 or 5.1.6 connectors because they don't work
with Cocoon 2.1 (a strange bug with column aliases, aka. "SELECT
column AS alias", worthy of another thread.)
Has anybody seen anything like this before? Do you want me to try and
build a minimal example that shows the error? Could it be the
prepared statements' fault?
Any help will be appreciated.
Tobia
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]