Unfortunately this didn't not solve my issue, I still receive the same
500 errors I posted earlier in this thread.  Searching on that error I
think I understand the issue; tomcat is trying to get something from
mysql after a long time (8 hours default timeout for old mysql
connections) and it's not finding a connection and throwing the error
- but on a reload it's making a new connection so all is good.  What
I've read tells me that Tomcat needs to be running with testOnBorrow
and a few other things defined so that it tests if there's a
connection available before making the attempt.  So, after reading the
following posts:
http://mext.at/?p=14
mysql docs: 
http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-j2ee.html#connector-j-usagenotes-tomcat

I've added the following block to my sever.xml:
    <resource>
        name="jdbc/ApplicationDS"
        auth="Container"
        type="javax.sql.DataSource"
        maxActive="50″
        maxIdle="10″
        validationQuery="SELECT 1″
        testOnBorrow="true"
        testWhileIdle="true"
        timeBetweenEvictionRunsMillis="10000″
        minEvictableIdleTimeMillis="60000″
         username="rootr"
        password="********"
        driverClassName="com.mysql.jdbc.Driver"
        url="jdbc:mysql://localhost:3306/db"/>
    </resource>

Any thought as to if this should work?  I'll report back if I get more 500s...

Thanks

P

On Fri, Dec 5, 2008 at 6:26 PM, Phil Cryer <[EMAIL PROTECTED]> wrote:
> Thanks Chris, I could never figure out what I needed to change in
> MySQL, but reading the docs I found that config line, which by default
> wasn't defined in Debian's *.cnf files.  So I added it, and it's now
> more than Fedora:
>
> # echo "wait_timeout    28800" >> /etc/mysql/my.cnf
>
> I've restarted MySQL and Tomcat for good measure, and will monitor it
> over the weekend.
>
> Thanks again.
>
> P
>
>
> On Fri, Dec 5, 2008 at 5:41 PM, Chris Wilper <[EMAIL PROTECTED]> wrote:
>> Hi Phil,
>>
>> From the stack trace on the web page, it looks like the connection to
>> mysql has probably timed out.  In this context, the connections are
>> coming from the pool configured near the end of your fedora.fcfg.  It
>> may be that the connection timeout configured on your MySQL server is
>> less than that configured in fedora.fcfg's minEvictableIdleTimeMillis
>> (If you haven't changed it, it's 1800 seconds or 30 mins).  Can you
>> check your /etc/my.cnf or my.ini file for your MySQL install and see
>> if a wait_timeout value is set?  I'm not sure what the default is, but
>> whatever it is set to on the server should ultimately be greater or
>> equal to the value in your fedora.fcfg.
>>
>> - Chris
>>
>> On Fri, Dec 5, 2008 at 2:16 PM, Phil Cryer <[EMAIL PROTECTED]> wrote:
>>> I've gotten another 500 error - it's been sometime since the last one,
>>> and just like that one a simple refresh of the browser brought
>>> everything back fine.  Again running fedora-commons 3.0, on Debian
>>> with system installed Tomcat.  Note that I haven't had any other
>>> errors or crashes recently, including during large ingests; the system
>>> is working great.
>>>
>>> The error: StorageDeviceException: Error querying sql db:
>>> Communications link failure due to underlying exception
>>>
>>> Points to a loss of connection with the DB - but MySQL logs don't show
>>> any errors, and monit (the monitoring app) did not report either being
>>> unavailable.  Do the errors help tell the story, or do we need debug
>>> output?
>>>
>>> I captured the error page output here:
>>> http://mbgserv18.mobot.org/tmp/oai.html
>>>
>>> And the details from catalina.log:
>>> Dec 5, 2008 9:30:29 AM org.apache.catalina.core.StandardHostValve custom
>>> SEVERE: Exception Processing ErrorPage[errorCode=404,
>>> location=/jsp/notfound-404.jsp]
>>> org.apache.jasper.JasperException
>>>        at 
>>> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
>>>        at 
>>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
>>>        at 
>>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
>>>        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>>        at 
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>>>        at 
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>>>        at 
>>> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
>>>        at 
>>> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
>>>        at 
>>> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)
>>>        at 
>>> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>>>        at 
>>> org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:364)
>>>        at 
>>> org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:285)
>>>        at 
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>>>        at 
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>>>        at 
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>>>        at 
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>>>        at 
>>> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:834)
>>>        at 
>>> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640)
>>>        at 
>>> org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
>>>        at java.lang.Thread.run(Thread.java:619)
>>>
>>> ------------------------------------------------------------------------------
>>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
>>> The future of the web can't happen without you.  Join us at MIX09 to help
>>> pave the way to the Next Web now. Learn more and register at
>>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
>>> _______________________________________________
>>> Fedora-commons-developers mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers
>>>
>>
>
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Fedora-commons-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers

Reply via email to