git repo location:- https://github.com/bcgov/EDUC-PEN-REQUEST-API/tree/master/api
Below is the console output of startup log.
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.2.0.RELEASE)
2020-04-04 17:02:18,504 | [pen-request-api-master-150-pwhcb] | INFO | [main] | c.b.g.e.a.p.PenRequestApiResourceApplication:55 | Starting PenRequestApiResourceApplication v0.0.1-SNAPSHOT on pen-request-api-master-150-pwhcb with PID 1 (/deployments/penrequest-api-0.0.1-SNAPSHOT.jar started by jboss in /deployments)
2020-04-04 17:02:18,599 | [pen-request-api-master-150-pwhcb] | INFO | [main] | c.b.g.e.a.p.PenRequestApiResourceApplication:651 | No active profile set, falling back to default profiles: default
2020-04-04 17:02:44,701 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.d.r.c.RepositoryConfigurationDelegate:126 | Bootstrapping Spring Data repositories in DEFAULT mode.
2020-04-04 17:02:46,799 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.d.r.c.RepositoryConfigurationDelegate:182 | Finished Spring Data repository scanning in 1699ms. Found 6 repository interfaces.
2020-04-04 17:02:56,003 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 | Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-04-04 17:02:57,497 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 | Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-04-04 17:02:57,506 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 | Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-04-04 17:02:57,699 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 | Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@4cc8eb05' of type [org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-04-04 17:02:57,707 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 | Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-04-04 17:02:57,897 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 | Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-04-04 17:03:04,408 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.b.w.e.tomcat.TomcatWebServer:92 | Tomcat initialized with port(s): 8080 (http)
2020-04-04 17:03:04,562 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.a.catalina.core.StandardService:173 | Starting service [Tomcat]
2020-04-04 17:03:04,562 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.a.catalina.core.StandardEngine:173 | Starting Servlet engine: [Apache Tomcat/9.0.27]
2020-04-04 17:03:05,403 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.a.c.c.C.[Tomcat].[localhost].[/]:173 | Initializing Spring embedded WebApplicationContext
2020-04-04 17:03:05,404 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.web.context.ContextLoader:284 | Root WebApplicationContext: initialization completed in 44304 ms
2020-04-04 17:03:17,304 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.h.jpa.internal.util.LogHelper:31 | HHH000204: Processing PersistenceUnitInfo [name: default]
2020-04-04 17:03:19,006 | [pen-request-api-master-150-pwhcb] | INFO | [main] | org.hibernate.Version:46 | HHH000412: Hibernate Core {5.4.6.Final}
2020-04-04 17:03:23,205 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.h.annotations.common.Version:49 | HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2020-04-04 17:03:25,302 | [pen-request-api-master-150-pwhcb] | INFO | [main] | com.zaxxer.hikari.HikariDataSource:110 | HikariPool-1 - Starting...
2020-04-04 17:03:31,003 | [pen-request-api-master-150-pwhcb] | INFO | [main] | com.zaxxer.hikari.HikariDataSource:123 | HikariPool-1 - Start completed.
2020-04-04 17:03:31,405 | [pen-request-api-master-150-pwhcb] | INFO | [main] | org.hibernate.dialect.Dialect:172 | HHH000400: Using dialect: org.hibernate.dialect.Oracle12cDialect
2020-04-04 17:03:57,595 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.h.tuple.entity.EntityMetamodel:344 | HHH000157: Lazy property fetching available for: ca.bc.gov.educ.api.penrequest.model.PenRequestEntity
2020-04-04 17:04:00,598 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.h.tuple.entity.EntityMetamodel:344 | HHH000157: Lazy property fetching available for: ca.bc.gov.educ.api.penrequest.model.DocumentEntity
2020-04-04 17:04:03,700 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.h.e.t.j.p.i.JtaPlatformInitiator:52 | HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2020-04-04 17:04:03,804 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.o.j.LocalContainerEntityManagerFactoryBean:416 | Initialized JPA EntityManagerFactory for persistence unit 'default'
2020-04-04 17:04:07,299 | [pen-request-api-master-150-pwhcb] | WARN | [main] | o.s.b.a.o.j.JpaBaseConfiguration$JpaWebConfiguration:220 | spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2020-04-04 17:04:25,602 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.s.c.ThreadPoolTaskExecutor:171 | Initializing ExecutorService 'applicationTaskExecutor'
2020-04-04 17:04:50,698 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.b.a.s.s.UserDetailsServiceAutoConfiguration:86 |
Using generated security password: 7b592c95-ae10-4106-be0d-28d8172a1b58
2020-04-04 17:04:55,099 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.s.web.DefaultSecurityFilterChain:43 | Creating filter chain: Ant [pattern='/v3/api-docs/**'], []
2020-04-04 17:04:55,100 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.s.web.DefaultSecurityFilterChain:43 | Creating filter chain: Ant [pattern='/actuator/**'], []
2020-04-04 17:04:55,100 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.s.web.DefaultSecurityFilterChain:43 | Creating filter chain: Ant [pattern='/swagger-ui/**'], []
2020-04-04 17:04:55,100 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.s.web.DefaultSecurityFilterChain:43 | Creating filter chain: Ant [pattern='/health'], []
2020-04-04 17:04:55,702 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.s.web.DefaultSecurityFilterChain:43 | Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@654c1a54, org.springframework.security.web.context.SecurityContextPersistenceFilter@367795c7, org.springframework.security.web.header.HeaderWriterFilter@73d6d0c, org.springframework.security.web.authentication.logout.LogoutFilter@673bb956, org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter@680362a, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@3956b302, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@1fd386c3, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@5bdaf2ce, org.springframework.security.web.session.SessionManagementFilter@3961a41a, org.springframework.security.web.access.ExceptionTranslationFilter@16943e88, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@1761de10]
2020-04-04 17:04:56,101 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.s.web.DefaultSecurityFilterChain:43 | Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@64040287, org.springframework.security.web.context.SecurityContextPersistenceFilter@4b61d0c6, org.springframework.security.web.header.HeaderWriterFilter@537b32ef, org.springframework.security.web.csrf.CsrfFilter@60e9df3c, org.springframework.security.web.authentication.logout.LogoutFilter@107e5441, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@1059754c, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@304b9f1a, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@110844f6, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@7f4037ed, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@6f815e7f, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@65e7f52a, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@6f89f665, org.springframework.security.web.session.SessionManagementFilter@7dc51783, org.springframework.security.web.access.ExceptionTranslationFilter@435ce306, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@6e4ea0bd]
2020-04-04 17:04:56,801 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.b.a.e.web.EndpointLinksResolver:58 | Exposing 14 endpoint(s) beneath base path '/actuator'
2020-04-04 17:04:57,806 | [pen-request-api-master-150-pwhcb] | INFO | [main] | o.s.b.w.e.tomcat.TomcatWebServer:204 | Tomcat started on port(s): 8080 (http) with context path ''
2020-04-04 17:04:57,899 | [pen-request-api-master-150-pwhcb] | INFO | [main] | c.b.g.e.a.p.PenRequestApiResourceApplication:61 | Started PenRequestApiResourceApplication in 172.297 seconds (JVM running for 189.108)
2020-04-04 17:05:07,505 | [pen-request-api-master-150-pwhcb] | INFO | [http-nio-8080-exec-1] | o.a.c.c.C.[Tomcat].[localhost].[/]:173 | Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-04-04 17:05:07,506 | [pen-request-api-master-150-pwhcb] | INFO | [http-nio-8080-exec-1] | o.s.web.servlet.DispatcherServlet:525 | Initializing Servlet 'dispatcherServlet'
2020-04-04 17:05:07,698 | [pen-request-api-master-150-pwhcb] | INFO | [http-nio-8080-exec-1] | o.s.web.servlet.DispatcherServlet:547 | Completed initialization in 192 ms
Comment From: wilkinsona
Thanks for the sample. I had to make some modifications to its application.properties
to allow the application to begin to startup. With those changes in place, I can see that Spring Data repository scanning completed in 67ms:
2020-04-05 10:03:19,502 | [Andys-MacBook-Pro.local] | INFO | [main] | o.s.d.r.c.RepositoryConfigurationDelegate:182 | Finished Spring Data repository scanning in 67ms. Found 6 repository interfaces.
By comparison, it took 1699ms in your OpenShift environment. That would suggest that it is severely constrained. It could be a heap size problem leading to GC thrash, but I think it's more likely that it's a CPU-related problem. That we make this a duplicate of https://github.com/spring-projects/spring-boot/issues/19911. Please see that issues for some suggestions.