Glassfish / Payara: why deploying a large web application for Glassfish-4.1.1 (or Payara 4.1.1.163 server) takes 5 times more than Glassfish-4.1

Mac OS X: Yosemite 10.10.5 

Until recently, I used:

 NetBeans8.1beta Glassfish4.1 Mojarra 2.2.7 

I recently researched using:

 NetBeans8.1 Glassfish4.1.1 Mojarra 2.2.12. 

With the very large JSF web application (with ObjectDB as the JPA persistence provider), I am experiencing a massive increase in deployment time to Glassfish4.1.1 (over 10 minutes) than Glassfish4.1 (about 2 minutes). This is about 5 times slower.

[EDIT: 2016-09-13 Tried with Payara 163 Full (Payara Server 4.1.1.163) and it took more than 20 minutes, even slower than on Glassfish4.1.1, with almost identical settings]

I cannot reproduce here or provide examples of a large web application.

Q1: Has anyone experienced any similar difference between Glassfish-4.1 and Glassfish-4.1.1 [EDIT: OR Payara Server 4.1.1.163], and where can I look for the difference?

(I'm already trying to research it using NetBeans Profiler, but it’s not so simple, but finding the reason.)


[EDIT: 2016-09-15 time tests]

I made a thorough parallel comparison using screencast recording and comparing with timings in the log.

In Payara41 (4.1.1.163) and Glassfish4.1.1 it "gets stuck", as shown below, for about 10 minutes, and I did not find any log settings that give here one line of output where the problem occurs, and the server is running in mode DEBUG also does not seem to provide any additional information.

 [2016-09-14T23:02:53.450+1000] [Payara 4.1] [INFO] [NCLS-LOGGING-00009] [javax.enterprise.logging] [tid: _ThreadID=19 _ThreadName=RunLevelControllerThread-1473858173343] [timeMillis: 1473858173450] [levelValue: 800] [[ Running Payara Version: Payara Server 4.1.1.163 #badassfish (build 215)]] 

... runs fine through all the steps, and then through dozens of these JJDI EJB names:

 [2016-09-14T23:03:48.823+1000] [Payara 4.1] [INFO] [AS-EJB-00054] [javax.enterprise.ejb.container] [tid: _ThreadID=74 _ThreadName=admin-thread-pool(2)] [timeMillis: 1473858228823] [levelValue: 800] [[ Portable JNDI names for EJB BeanName: [java:global/app-name/BeanName!com.example.BeanName, java:global/app-name/BeanName]]] 

Gives this message to the WELD version:

 [2016-09-14T23:03:48.875+1000] [Payara 4.1] [INFO] [] [org.jboss.weld.Version] [tid: _ThreadID=74 _ThreadName=admin-thread-pool(2)] [timeMillis: 1473858228875] [levelValue: 800] [[ WELD-000900: 2.3.5 (Final)]] 

... then takes about 8 seconds to this message.

 [2016-09-14T23:03:56.666+1000] [Payara 4.1] [INFO] [] [org.jboss.weld.Event] [tid: _ThreadID=74 _ThreadName=admin-thread-pool(2)] [timeMillis: 1473858236666] [levelValue: 800] [[ WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.]] 

... Then take many minutes (usually about 10 minutes) before resuming these harmless warnings.

 [2016-09-14T23:11:33.387+1000] [Payara 4.1] [INFO] [] [org.jboss.weld.Bootstrap] [tid: _ThreadID=74 _ThreadName=admin-thread-pool(2)] [timeMillis: 1473858693387] [levelValue: 800] [[ WELD-001125: Illegal bean type java.util.Comparator<javax.persistence.metamodel.EntityType<?>> ignored on [EnhancedAnnotatedTypeImpl] public static class com.example.ElementManager$EntityTypeSorter]] [2016-09-14T23:11:59.736+1000] [Payara 4.1] [WARNING] [] [org.glassfish.jersey.internal.Errors] [tid: _ThreadID=74 _ThreadName=admin-thread-pool(2)] [timeMillis: 1473858719736] [levelValue: 900] [[ The following warnings have been detected: WARNING: Parameter 1 of type T from public void com.example.NumberProperty.setDefaultValue(T) is not resolvable to a concrete type. 

]]

Similar warnings appear in Glassfish4.1, but a long pause / hold does not occur.

Q2: What else can I do to find out why it pauses / stops there for ages?

0
source share
1 answer

Thanks to the detailed help from the Payara team I have an answer.

The maximum heap settings were different between my old Glassfish4.1 (-Xmx2048m) installation and the new Glassfish4.1.1 and Payara41 (-Xmx512m) installations. When creating the database model of the web application project at startup, it fell into the heap limit of 512 m and caused excessive garbage collection (as JVisualVM showed), which significantly slowed down the deployment.

I already had these runtime VMargs for the NetBeans web application project:

 -Xms2048m -Xmx2048m 

But when installing NetBeans8.1 (with Glassfish4.1.1) and then in Payara41, I forgot to match this on the new servers as well, to make room for it. With an increase in the maximum heap and a fixed minimum, the deployment time is about 2 minutes for both Glassfish 4.1.1 and Payara41.

+1
source

Source: https://habr.com/ru/post/1245407/


All Articles