Error- Pooled connections maximum limit reached.  Topic is solved

Discussions relating to the REST API of Jiwa 7.

Error- Pooled connections maximum limit reached.

Postby sunad » Tue Feb 27, 2018 5:14 pm

We are working on a project where we are integrating Jiwa with a CRM...
It was all working fine until an error popped up...
Jiwa database is Hosted on a URL and we are accessing the database using that URL.

Below is the error-

We are getting
{
"ResponseStatus": {
"ErrorCode": "InvalidOperationException",
"Message": "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.",
"StackTrace": "[Authenticate: 2/23/2018 3:56:26 AM]:\n[REQUEST: {UserName:jiwausername,Password:jiwapassword}]\nSystem.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.\r\n at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)\r\n at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)\r\n at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)\r\n at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)\r\n at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)\r\n at System.Data.SqlClient.SqlConnection.Open()\r\n at JiwaFinancials.Jiwa.JiwaODBC.database.GetNewConnection(String NewConnectionString)\r\n at JiwaFinancials.Jiwa.JiwaODBC.database.Logon(AuthenticationModes AuthenticationMode, String Name, String Password, Boolean& rtnMustChangePassword, DateTime& rtnPasswordLastChangedDateTime)\r\n at JiwaFinancials.Jiwa.JiwaApplication.Manager.Logon(String ServerName, String DatabaseName, AuthenticationModes AuthenticationMode, String JiwaUserName, String JiwaPassword)\r\n at JiwaFinancials.Jiwa.JiwaServiceModel.JiwaAuthProvider.TryAuthenticate(IServiceBase authService, String userName, String password) in c:\\ProgramData\\Jiwa Financials\\Jiwa 7\\7.1.0\\SYSTEM\\IAT-SQL\\IAT_Trust7_TEST\\Plugins\\Admin\\Compile\\REST API\\REST API.cs:line 1120\r\n at ServiceStack.Auth.CredentialsAuthProvider.Authenticate(IServiceBase authService, IAuthSession session, String userName, String password, String referrerUrl)\r\n at ServiceStack.Auth.CredentialsAuthProvider.Authenticate(IServiceBase authService, IAuthSession session, Authenticate request)\r\n at ServiceStack.Auth.AuthenticateService.Authenticate(Authenticate request, String provider, IAuthSession session, IAuthProvider oAuthConfig)\r\n at ServiceStack.Auth.AuthenticateService.Post(Authenticate request)\r\n at lambda_method(Closure , Object , Object )\r\n at ServiceStack.Host.ServiceRunner`1.Execute(IRequest req, Object instance, TRequest requestDto)",
"Errors": []
}
}


The version of Jiwa which can be seen from this errors 7.1.0

More Information-
We are using Rest API.
Jiwa System and database are hosted on a remote Server.
We get this error while authentication API call.
sunad
I'm new here
I'm new here
 
Posts: 4
Joined: Mon Jan 08, 2018 8:27 pm
Topics Solved: 0

Re: Error- Pooled connections maximum limit reached.

Postby SBarnes » Wed Feb 28, 2018 5:42 am

Hi Sunad,

I will assume for our email correspondence yesterday evening that this is now resolved?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1620
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Error- Pooled connections maximum limit reached.  Topic is solved

Postby DannyC » Wed Feb 28, 2018 8:44 am

For anyone reading to fix, the Jiwa 7 API service was stopped & restarted.
Then a logoff needs to be done in the code to stop it happening again.
User avatar
DannyC
Senpai
Senpai
 
Posts: 638
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Error- Pooled connections maximum limit reached.

Postby Mike.Sheen » Wed Feb 28, 2018 10:52 am

Thanks DannyC and SBarnes for helping out with this.

The REST API was intended to log off an authenticated user automatically when a session expires - but I've had a look and it appears it does not even attempt to do this - we must have forgotten about that bit!

I've added DEV-6510 to address this.

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Error- Pooled connections maximum limit reached.

Postby sunad » Mon Mar 05, 2018 2:08 pm

Yes Stuart, It is resolved.

Great thanks to Stuart Danny And Mike for helping us with this.

Sorry for late reply.
sunad
I'm new here
I'm new here
 
Posts: 4
Joined: Mon Jan 08, 2018 8:27 pm
Topics Solved: 0


Return to REST API

Who is online

Users browsing this forum: No registered users and 3 guests