grails app terminates after some idle time – what triggers unexpected shutdown? -


i've got grails 2.4.3 app internal use in company. problem is, after time when had running (grails dev run-app), terminates listening without prior notice:

info  [thread-3]: pausing protocolhandler ["http-bio-8080"] info  [thread-3]: stopping service tomcat ### shutting down. info  [thread-3]: stopping protocolhandler ["http-bio-8080"] info  [thread-3]: destroying protocolhandler ["http-bio-8080"]   

(the 3rd line destroy() method in bootstrap.groovy)

for datasource connections, there keepalive strategies pooled connections. i'd grails app stay online, too.

how can investigate on causes server stop listening? common issue , can solved config?

edit:

the root logger shows following on debug level:

debug [http-bio-8080-exec-4]: counting down[http-bio-8080-exec-4] latch=2 debug [http-bio-8080-exec-1]: error parsing http request header java.net.sockettimeoutexception: read timed out     @ java.net.socketinputstream.socketread0(native method) ... debug [http-bio-8080-exec-1]: socket: [org.apache.tomcat.util.net.socketwrapper@5c0b659a:socket[addr=/0:0:0:0:0:0:0:1,port=58705,localport=8080]], status in: [open_read], state out: [closed] debug [http-bio-8080-exec-1]: counting down[http-bio-8080-exec-1] latch=1 debug [containerbackgroundprocessor[standardengine[tomcat]]]: start expire sessions standardmanager @ 1421320212649 sessioncount 0 debug [containerbackgroundprocessor[standardengine[tomcat]]]: end expire sessions standardmanager processingtime 0 expired sessions: 0 debug [containerbackgroundprocessor[standardengine[tomcat]]]: start expire sessions standardmanager @ 1421320272661 sessioncount 0 debug [containerbackgroundprocessor[standardengine[tomcat]]]: end expire sessions standardmanager processingtime 0 expired sessions: 0 debug [containerbackgroundprocessor[standardengine[tomcat]]]: start expire sessions standardmanager @ 1421320332673 sessioncount 0 debug [containerbackgroundprocessor[standardengine[tomcat]]]: end expire sessions standardmanager processingtime 0 expired sessions: 0 debug [http-bio-8080-acceptor-0]: counting up[http-bio-8080-acceptor-0] latch=1 debug [http-bio-8080-exec-6]: error parsing http request header java.net.socketexception: connection reset     @ java.net.socketinputstream.read(socketinputstream.java:196)     @ java.net.socketinputstream.read(socketinputstream.java:122)     @ org.apache.coyote.http11.internalinputbuffer.fill(internalinputbuffer.java:519) ... debug [http-bio-8080-exec-6]: socket: [org.apache.tomcat.util.net.socketwrapper@674b5757:socket[addr=/10.41.2.116,port=46215,localport=8080]], status in: [open_read], state out: [closed] debug [http-bio-8080-exec-6]: counting down[http-bio-8080-exec-6] latch=1 debug [thread-3]: setting state [standardserver[-1]] [stopping_prep] debug [thread-3]: setting state [standardserver[-1]] [stopping] debug [thread-3]: setting state [standardservice[tomcat]] [stopping_prep] info  [thread-3]: pausing protocolhandler ["http-bio-8080"] debug [thread-3]: unlock socket for:localhost/127.0.0.1:8080 debug [thread-3]: socket unlock completed for:localhost/127.0.0.1:8080 debug [http-bio-8080-acceptor-0]: counting down[http-bio-8080-acceptor-0] latch=0 info  [thread-3]: stopping service tomcat debug [thread-3]: setting state [standardservice[tomcat]] [stopping] debug [thread-3]: setting state [standardengine[tomcat]] [stopping_prep] debug [thread-3]: setting state [standardengine[tomcat]] [stopping] debug [thread-3]: setting state [pipeline[standardengine[tomcat]]] [stopping_prep] debug [thread-3]: setting state [pipeline[standardengine[tomcat]]] [stopping] debug [thread-3]: setting state [org.apache.catalina.core.standardenginevalve[tomcat]] [stopping_prep] debug [thread-3]: setting state [org.apache.catalina.core.standardenginevalve[tomcat]] [stopping] debug [thread-3]: setting state [org.apache.catalina.core.standardenginevalve[tomcat]] [stopped] debug [thread-3]: setting state [pipeline[standardengine[tomcat]]] [stopped] debug [tomcat-startstop-2]: setting state [standardengine[tomcat].standardhost[localhost]] [stopping_prep] debug [tomcat-startstop-2]: unregister host [localhost] @ domain [null] connector [connector[http/1.1-8080]] debug [tomcat-startstop-2]: setting state [standardengine[tomcat].standardhost[localhost]] [stopping] debug [tomcat-startstop-2]: setting state [pipeline[standardengine[tomcat].standardhost[localhost]]] [stopping_prep] debug [tomcat-startstop-2]: setting state [pipeline[standardengine[tomcat].standardhost[localhost]]] [stopping] debug [tomcat-startstop-2]: setting state [org.apache.catalina.valves.errorreportvalve[localhost]] [stopping_prep] debug [tomcat-startstop-2]: setting state [org.apache.catalina.valves.errorreportvalve[localhost]] [stopping] debug [tomcat-startstop-2]: setting state [org.apache.catalina.valves.errorreportvalve[localhost]] [stopped] debug [tomcat-startstop-2]: setting state [org.apache.catalina.core.standardhostvalve[localhost]] [stopping_prep] debug [tomcat-startstop-2]: setting state [org.apache.catalina.core.standardhostvalve[localhost]] [stopping] debug [tomcat-startstop-2]: setting state [org.apache.catalina.core.standardhostvalve[localhost]] [stopped] debug [tomcat-startstop-2]: setting state [pipeline[standardengine[tomcat].standardhost[localhost]]] [stopped] debug [localhost-startstop-2]: setting state [standardengine[tomcat].standardhost[localhost].standardcontext[/workspent]] [stopping_prep] debug [localhost-startstop-2]: unregister context [/workspent] connector [connector[http/1.1-8080]] debug [localhost-startstop-2]: setting state [standardengine[tomcat].standardhost[localhost].standardcontext[/workspent]] [stopping] debug [localhost-startstop-2]: setting state [standardengine[tomcat].standardhost[localhost].standardcontext[/workspent].standardwrapper[grails-errorhandler]] [stopping_prep] debug [localhost-startstop-2]: unregister wrapper [grails-errorhandler] in context [/workspent] connector [connector[http/1.1-8080]] debug [localhost-startstop-2]: setting state [standardengine[tomcat].standardhost[localhost].standardcontext[/workspent].standardwrapper[grails-errorhandler]] [stopping] debug [localhost-startstop-2]: setting state [pipeline[standardengine[tomcat].standardhost[localhost].standardcontext[/workspent].standardwrapper[grails-errorhandler]]] [stopping_prep] debug [localhost-startstop-2]: setting state [pipeline[standardengine[tomcat].standardhost[localhost].standardcontext[/workspent].standardwrapper[grails-errorhandler]]] [stopping] debug [localhost-startstop-2]: setting state [org.apache.catalina.core.standardwrappervalve[grails-errorhandler]] [stopping_prep] debug [localhost-startstop-2]: setting state [org.apache.catalina.core.standardwrappervalve[grails-errorhandler]] [stopping] debug [localhost-startstop-2]: setting state [org.apache.catalina.core.standardwrappervalve[grails-errorhandler]] [stopped] debug [localhost-startstop-2]: setting state [pipeline[standardengine[tomcat].standardhost[localhost].standardcontext[/workspent].standardwrapper[grails-errorhandler]]] [stopped] debug [localhost-startstop-2]: setting state [standardengine[tomcat].standardhost[localhost].standardcontext[/workspent].standardwrapper[grails-errorhandler]] [stopped] debug [localhost-startstop-2]: setting state [standardengine[tomcat].standardhost[localhost].standardcontext[/workspent].standardwrapper[grails]] [stopping_prep] debug [localhost-startstop-2]: unregister wrapper [grails] in context [/workspent] connector [connector[http/1.1-8080]] info  [localhost-startstop-2]: ### shutting down. current time 2015-01-15t12:12:39.009+01:00 info  [localhost-startstop-2]: destroying spring frameworkservlet 'grails' 

take in stacktrace.log file, error there.
docs says:

when exceptions occur, there can awful lot of noise in stacktrace java , groovy internals. grails filters these typically irrelevant details , restricts traces non-core grails/groovy class packages.

when happens, full trace logged stacktrace logger, default writes output file called stacktrace.log

if don't know file, can configure through log4j: http://grails.org/doc/latest/guide/conf.html

in config.groovy:

error stdout: "stacktrace" log4j = {     appenders {         rollingfile name: "stacktrace", maxfilesize: 1024,                     file: "/var/tmp/logs/myapp-stacktrace.log"     } } 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -