vmguneri / myschedule

Automatically exported from code.google.com/p/myschedule
0 stars 0 forks source link

com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is for the latest version.  I am seeing this error a lot when I am 
clicking between the Jobs page and the History page.  Not sure if its borrowing 
a connection which one of my jobs are somehow closing.

What steps will reproduce the problem?
1. Using latest version with JobHistory plugin
2. Create my own job.
3. Click between pages.

What is the expected output? Job should run.

What do you see instead?  The error page with the following stacktrace

org.quartz.JobPersistenceException: Couldn't determine state of trigger 
(Monitoring.Minutely Trigger): No operations allowed after statement closed. 
[See nested exception: 
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No operations 
allowed after statement closed.]
    at myschedule.quartz.extra.SchedulerTemplate.getTriggerState(SchedulerTemplate.java:232)
    at myschedule.service.QuartzUtils.isTriggerPaused(QuartzUtils.java:86)
    at myschedule.web.servlet.app.handler.JobHandlers$3.handleViewData(JobHandlers.java:114)
    at myschedule.web.servlet.UrlRequestActionHandler.handleAction(UrlRequestActionHandler.java:49)
    at myschedule.web.servlet.ActionHandlerServlet.process(ActionHandlerServlet.java:109)
    at myschedule.web.servlet.AbstractControllerServlet.doGet(AbstractControllerServlet.java:82)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

Original issue reported on code.google.com by tomans...@gmail.com on 24 Feb 2012 at 11:21

GoogleCodeExporter commented 9 years ago
Hi Tom,

What do you mean by "Not sure if its borrowing a connection which one of my 
jobs are somehow closing.". 

If you don't mind, can you show you write your job? How are you using the 
Quartz connection?

Original comment by saltnlight5 on 25 Feb 2012 at 4:09

GoogleCodeExporter commented 9 years ago
@Tom

I also observed that you will get the same error too if I were to stop the 
database service while MySchedule/Quartz is running. So you sure that your 
database didn't have any problem right?

Original comment by saltnlight5 on 25 Feb 2012 at 3:32

GoogleCodeExporter commented 9 years ago
No database problems. Although I have been constantly starting and stopping
the scheduler while trying to get my jobs working and myscheduler
configured.

So that might be playing a factor.  I have also been noticing the scheduler
having trouble stopping the jobs. I end up having to do a kill -SIGTERM so
that might also be a factor.

Sorry I cannot be more help! I'll keep investigating.

Original comment by tomans...@gmail.com on 25 Feb 2012 at 4:25

GoogleCodeExporter commented 9 years ago
I think I might have solved this problem in the same was as I solved the other 
ConcurrentModifications error.  I have been reading that the mysql global 
system property "wait_timeout" might create this kind of issue.  The default 
value is 28800.  Mine was 15.  

I changed it back to 28800 and things seemed to have stabilized quite a bit.  
Which to me suggests my value was way too low which was causing the connection 
to be closed by MySQL and then it would not be available when needed by 
MyScheduler which was trying to access a closed connection.

I'll keep monitoring and post back if I see any changes.

Original comment by tomans...@gmail.com on 26 Feb 2012 at 9:43

GoogleCodeExporter commented 9 years ago
closed as non-fix

Original comment by saltnlight5 on 21 Mar 2012 at 3:37

GoogleCodeExporter commented 9 years ago

Original comment by saltnlight5 on 21 Mar 2012 at 3:38