Layer7 API Management

 View Only
  • 1.  UserSwitchedRoutingDataSource

    Posted Aug 31, 2018 08:12 AM

    Getting below errors while load testing(Two nodes).

    1. com.l7tech.server.util.UserSwitchedRoutingDataSource.getConnection()
    2. com.mchange.v2.c3p0.ComboPooledDataSource.getConnection()

     

    Please share your inputs on UserSwitchedRoutingDataSource. I think ComboPooledDataSource is related to max connection limit is reached(i.e. connection per nodes=max connections in MySQL)

     

    Env information: Gateway 9.2 version, OTK 4.1 version, external single MySQL DB is being used. Two nodes



  • 2.  Re: UserSwitchedRoutingDataSource

    Posted Aug 31, 2018 05:43 PM

    Hello,

     

    Can you please clarify the way the load test is being conducted and provide the full context of the errors? I ask because the two items you mentioned are not specifically in the form of an error, so I'm unsure of the context behind it. Without that context, I can't really assist too effectively.

     

    Some information that may be helpful:

     

    1. What product and product version are you load testing? I see you noted Gateway 9.2 and OTK 4.1, is it safe to say you are then testing OAuth-related policies? Or are these different types of policies?
    2. What type of requests are these?
    3. What errors show in the logs or audits? Full entries please.
    4. Where is your database stored? You noted it's external, but is the external database held in AWS by chance? The more details here, the better we can assist.
    5. What version if your MySQL database at?

     

    Thank you.



  • 3.  Re: UserSwitchedRoutingDataSource

    Posted Sep 04, 2018 10:31 AM

    Thank you Dauncey for valuable inputs,

    Agree, these are not may be directly related to error as I don't see in Gateway logs. But Response time increase because of this bhavior as you can see below screenshots for guest token services.

     

    1. What product and product version are you load testing? I see you noted Gateway 9.2 and OTK 4.1, is it safe to say you are then testing OAuth-related policies? Or are these different types of policies? Reply: [Gateway 9.2 and OTK 4.1] for guest token /auth/oauth/token grant_type=cleint_credentials
    2. What type of requests are these? Reply: HTTPS protocol with POST 
      curl -X POST \
        https://<gateway_host>/auth/oauth/v2/token \
        -H 'authorization: Basic  credential' \
        -H 'content-type: application/x-www-form-urlencoded'
        -d grant_type=client_credentials
    3. What errors show in the logs or audits? Full entries please. Reply: Don't see such error in splunk which is integrated with gateway logs. Are you asking about ssg logs?
    4. Where is your database stored? You noted it's external, but is the external database held in AWS by chance? The more details here, the better we can assist.Reply: Yes, it is in AWS 
    5. What version if your MySQL database at? Reply: MySQL Innodb  5.5.53

     

    Please let me know if you need any additional information.



  • 4.  Re: UserSwitchedRoutingDataSource

    Posted Sep 04, 2018 03:24 PM

    Hello,

     

    From this and your other posts, it seems you are deep into performance testing and tuning. This type of testing is usually best done and observed with the proper tools, such as CA API Performance Monitor. Then again, this concern seems to be more to do with your database.

     

    I know that AWS sets max connections to the database based on it's instance size, so depending on how much load you're throwing at the Gateway, you may be running into MySQL connection issues that Amazon has enforced at the AWS level. You should be able to view if you've reached your max connections on the database side from the AWS console.



  • 5.  Re: UserSwitchedRoutingDataSource

    Posted Sep 27, 2018 10:37 AM

    Is any further information needed on this one, or has the data been determined in the meantime since the last update? I think the original question should be modified too to reflect a proper error as opposed to the way it is currently written. It may be confusing to some viewers of this thread. It's a bit hard to follow what exactly is needed or being asked, so any clarification would be appreciated.