Hi,
we have noted that grails controllers (and only the controllers)
are consuming too much time to init the first time they are accessed.
After fine tunning loggers and debugging we've find out that part of
the problem *seems* to be related to some kind of Http11 NIO configuration.
This is what logs are stating:
2018-04-03 10:10:11.085 DEBUG --- [
http-nio-8080-exec-2] o.g.w.s.m.GrailsWebRequestFilter : Cleared
Grails thread-bound request context:
org.apache.catalina.connector.RequestFacade@33180f76
2018-04-03
10:10:11.085 DEBUG --- [ http-nio-8080-exec-2]
o.s.b.w.f.OrderedRequestContextFilter : Cleared thread-bound request
context: org.apache.catalina.connector.RequestFacade@33180f76
2018-04-03
10:10:11.085 DEBUG --- [ http-nio-8080-exec-2]
o.a.c.h.Http11Processor : Socket:
[org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@489b6e83:org.apache.tomcat.util.net.NioChannel@59efb21a:java.nio.channels.SocketChannel[connected
local=/
127.0.0.1:8080 remote=/127.0.0.1:35074]], Status in:
[OPEN_READ], State out: [OPEN]
***
2018-04-03 10:10:11.085 DEBUG ---
[ http-nio-8080-exec-2] o.a.c.h.Http11NioProtocol :
Pushed Processor [org.apache.coyote.http11.Http11Processor@723b8aa8]
***
2018-04-03
10:10:13.247 DEBUG --- [ http-nio-8080-exec-4]
o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of
singleton bean
'org.springframework.transaction.config.internalTransactionAdvisor'
2018-04-03
10:10:13.247 DEBUG --- [ http-nio-8080-exec-4]
o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of
singleton bean 'shiroAttributeSourceAdvisor'
as you can see, pushing the Http11Processor is taking 2s, and this is for every "first" controller access.
Can someone tell me if this is the expected behavior or what
should I check to look for some missconfig or a hint to improve this
times, it would be awesome.
This is our env environment,
$ grails -v
| Grails Version: 3.3.3
| Groovy Version: 2.4.14
| JVM Version: 1.8.0_152
The pc where I'm having this logs has an
Intel Core i7-8700K Coffee Lake 6-Core 3.7 GHz (4.7 GHz Turbo) + GIGABYTE Z370XP SLI + 32GB DDR4 2400Mhz
Regards,
Juanjo