8 Replies Latest reply on May 20, 2019 8:32 AM by mleite

    Migration from JBoss-5.1 to Wildfly-11

    mleite

      Hello, there.

       

      I have been working on an upgrade from JBoss-5.1/JEE5/JDK6 to Wildfly-11/JEE7/JDK8.

       

      The application migrated is performing ok, but I am facing some issues related to database access, especially to the SQL/HQL/Criteria executions runtimes. For example, one specific query running under JBoss-5.1 takes 10secs to run, but under Wildfly-11 it takes 2min. The query is the same and the database is the same.

       

      During the tests I got a thread dump and got some outputs like that:

      - locked <2f022383> (a org.postgresql.core.v3.QueryExecutorImpl)

       

      I've investigated the Postgresql driver release-notes looking for some bugs, but could not find anything. I also tried a few versions of the driver, including the last and stable one.

       

      I've also investigated the Hibernate 5.1.x (the version used by Wildfly) release notes, but could not find anything either.

       

      Could you guys help with any tips or ways that I can go through?

       

      Thanks in advance.

       

      Marcelo Leite

        • 1. Re: Migration from JBoss-5.1 to Wildfly-11
          avb2b

          Have you tried to enable hibernate show sql (hibernate.show_sql property) to see if the sql that is sent to the db is the same or similar ? Maybe if it's very different it can be the cause.

           

          Another thing to check is if you correctly set the database connection pool and server threads.

          • 2. Re: Migration from JBoss-5.1 to Wildfly-11
            mleite

            Hi, Andrea...

             

            thanks for your reply.

             

            Yes, I enabled hibernate to show SQL, and they are really the same. I checked what is reaching DB too.

             

            Server threads and pools are also well set, they have enough room to work.

             

            I tried Wildfly-13 too (as it has a new Hibernate internally), but the result was the same.

             

            Any other ideas that I can follow?

             

            BR

            • 3. Re: Migration from JBoss-5.1 to Wildfly-11
              avb2b

              We recently migrated a big application from jboss5 to wildfly15 and had no problem with queries, I'm afraid I can't be of more help.

              If the sql is the same and when you execute it with a sql client the query is fast then it must be something on the wildly side for sure...

              • 4. Re: Migration from JBoss-5.1 to Wildfly-11
                mleite

                Yes,

                 

                Our case is more or less the same, a big app from jboss5 to wildfly13. We decided to use jee7 for now.

                 

                I saw something related to the the bufferSize used by datasource connections, but had no effect too. Something like jdbc:postgresql://127.0.0.1:<port>/<db_name>?sendBufferSize=524288.

                 

                Is possible to tell which DB ad OS you are using there?

                 

                BR

                • 5. Re: Migration from JBoss-5.1 to Wildfly-11
                  avb2b

                  We're using Linux Centos and Postgres.

                  • 6. Re: Migration from JBoss-5.1 to Wildfly-11
                    mleite

                    Same DB and OS here.

                     

                    Maybe differences related to versions, but same env.

                     

                    How about JDK version. Which version are you using?

                    • 7. Re: Migration from JBoss-5.1 to Wildfly-11
                      avb2b

                      At the time of migration six months ago we were using jdk8, now jdk11.

                      • 8. Re: Migration from JBoss-5.1 to Wildfly-11
                        mleite

                        Same JDK version here, too.

                         

                        2 few more questions...

                         

                        What was the PG version used by your old version software and what is the new one you using now?

                        How about DB size? Is it a big DB (more than 2TB) or not?

                         

                        Thanks in advance.