users@glassfish.java.net

[gf-users] Re: Glassfish 4 remote ejb very slow

From: Brent Vaughn <Vaughn_at_iecokc.com>
Date: Mon, 27 Oct 2014 19:04:15 +0000

Sorry it has taken me so long to get back on this. Here is an application that is currently running very slowly on GF 4.1
https://github.com/jamie-lb/GF4ProblemProject

Here is what our investigation found.

We inject the PrmsIecProductDao EJB into a CDI bean and run the getProduct(String) method on the ProductDao interface. The CDI bean looks something like this…

@EJB(mappedName = "ejb/BillOfMaterials/iec")
private ProductDao prodDao;

public void someMethod(){
Product product = productDao.getProduct(“Some product id”);
}


We have found that a Product object with the return size of 50 KB takes 40 seconds to return in GF 4.1. It took less than 2 seconds in GF 3.1 for a Product object of similar size. Once we took out the database call in GF 4.1 and filled the object with 50KB of dummy data mimicking the same structure as a database filled Product object, the return time in GF 4.1 was less than two seconds. The problem isn’t the database query. The database query runs in less than 1 seconds. The return statement in the PrmsProductDao.getProduct(String) method just goes into limbo. It will take 40 seconds to return back to the caller.

Thanks for looking into this. Is there anything else I can provide to help in this?


From: Steven Siebert [mailto:smsiebe_at_gmail.com]
Sent: Thursday, October 23, 2014 9:53 AM
To: users_at_glassfish.java.net
Subject: [gf-users] Re: Glassfish 4 remote ejb very slow

>3) what does your EJB do (what resources does it access, etc)?
> a. It uses @EJB to inject local and remote ejbs
Are these remote EJBs on the same GF server?

>Where do I send the test app to?

You can upload the test app to wherever is most convenient for you...github.com<http://github.com> is a common place, for example.

>I will try to get it later, but right now I am getting torn apart at work over this. I will try to get it later today or tomorrow.
OK. Your other answers rule out some considerations, a reduced app would help us diagnose the problem with you.
S



On Thu, Oct 23, 2014 at 10:40 AM, Brent Vaughn <Vaughn_at_iecokc.com<mailto:Vaughn_at_iecokc.com>> wrote:
We have 80 applications on the same GF 4.1 instance. Probably half of those use remote ejbs.


1) what kind of load are handling when you have this slowdown...or is it always?

a. We have 80 applications on the same GF 4.1 instance. Probably around 30 of those use remote ejbs. It slows down across all the applications that use remote ejbs

2) what are your ejb pool settings?

a. The defaults from when you install. Initial and Minimum Pool Size is 0. Maximum Pool Size is 32. Pool Resize Quantity is 8. Pool idle timeout is 600 seconds

3) what does your EJB do (what resources does it access, etc)?

a. It uses @EJB to inject local and remote ejbs

4) anything in your log?

a. Nothing that I saw

5) is this app on the same physical machine, using the same hardware, or did you also change the host?

a. All the apps are running on the same physical machine

6) any other external changes?

a. Not that I know of

Where do I send the test app to? I will try to get it later, but right now I am getting torn apart at work over this. I will try to get it later today or tomorrow.

From: Steven Siebert [mailto:smsiebe_at_gmail.com<mailto:smsiebe_at_gmail.com>]
Sent: Thursday, October 23, 2014 6:51 AM
To: users_at_glassfish.java.net<mailto:users_at_glassfish.java.net>
Subject: [gf-users] Re: Glassfish 4 remote ejb very slow

We're gonna need some more information about this...
 - what kind of load are handling when you have this slowdown...or is it always?
 - what are your ejb pool settings?
 - what does your EJB do (what resources does it access, etc)?
 - anything in your log?
 - is this app on the same physical machine, using the same hardware, or did you also change the host?
 - any other external changes?

The easiest way to get an answer to your question, and give you a leg up in submitting a bug if there is one, is if you can reduce the problem within a small test application? If so, can you share that test application so we can test and check it out ourselves?
S

On Wed, Oct 22, 2014 at 4:29 PM, Brent Vaughn <Vaughn_at_iecokc.com<mailto:Vaughn_at_iecokc.com>> wrote:
We upgraded today to Glassfish 4.1. We have a problem with our remote EJBs returning very slowly. What used to return in 10 seconds on Glassfish 3.1 now returns in 2 minutes. The “slowness” appears to be in the return from the Remote EJB to the client that called it. Any idea why this is occurring?