"A possible error ocurred when accessing the JIWA database"  Topic is solved

Discussions relating to the REST API of Jiwa 7.

"A possible error ocurred when accessing the JIWA database"

Postby oliverbrooke » Tue Mar 29, 2022 2:40 pm

Hi there,
So when running queries against the API, I am confronted with this message at least 30% of the time...
"A possible error ocurred when accessing the JIWA database.
string(274) "{"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.","Errors":[]}}""

Do you know if there's a way to resolve this via changes to the IIS configuration or anything?

FYI, the query that generates this is;

https://api.redpoint.com.au/Queries/IN_ ... key=APIKEY

TIA :D
oliverbrooke
Occasional Contributor
Occasional Contributor
 
Posts: 10
Joined: Thu Mar 17, 2022 3:18 pm

Re: "A possible error ocurred when accessing the JIWA databa

Postby Scott.Pearce » Tue Mar 29, 2022 3:26 pm

What is the version number of the REST API plugin you are using? i.e. look in Plugin Maintenance.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221

Re: "A possible error ocurred when accessing the JIWA databa

Postby oliverbrooke » Tue Mar 29, 2022 5:28 pm

Hi Scott,
I don't have a clue - I can send you the link to the endpoint if that helps?
oliverbrooke
Occasional Contributor
Occasional Contributor
 
Posts: 10
Joined: Thu Mar 17, 2022 3:18 pm

Re: "A possible error ocurred when accessing the JIWA databa

Postby oliverbrooke » Wed Mar 30, 2022 8:57 am

I've asked the IT guy this question - will respond ASAP.

Just as an aside, do you feel that the API would be able to handle a consumer-facing e-commerce store that references JIWA for stock availability in real-time?
Admittedly, this may be a question more appropriately asked elsewhere but it's perhaps relevant here because it's possible I'm heading down a path of ultimate doom...?
oliverbrooke
Occasional Contributor
Occasional Contributor
 
Posts: 10
Joined: Thu Mar 17, 2022 3:18 pm

Re: "A possible error ocurred when accessing the JIWA databa

Postby Mike.Sheen » Wed Mar 30, 2022 11:00 am

oliverbrooke wrote:I've asked the IT guy this question - will respond ASAP.


If you open the plugin maintenance form in Jiwa, navigate to the REST API plugin , you'll find the version on the top right of the plugin form.

Scott's asking this because we have made some improvements recently which addresses issues exactly like you are reporting - and those fixes are in the plugin itself - which we increment the version on each change we make.

oliverbrooke wrote:Just as an aside, do you feel that the API would be able to handle a consumer-facing e-commerce store that references JIWA for stock availability in real-time?
Admittedly, this may be a question more appropriately asked elsewhere but it's perhaps relevant here because it's possible I'm heading down a path of ultimate doom...?


It should be ok, but best practice is to cache the stock levels at the web store side, so you're not having the web store hitting the Jiwa API real-time. Typically the Jiwa databases are not in an environment with the bandwidth for a busy web store to be hitting it - plus you don't want your web store to be impacted by maintenance windows on the Jiwa side.
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: "A possible error ocurred when accessing the JIWA databa

Postby oliverbrooke » Thu Mar 31, 2022 9:07 am

Ok great - thanks for that info...
I'm told that the API is v.7.2.1.1.2 - good?
oliverbrooke
Occasional Contributor
Occasional Contributor
 
Posts: 10
Joined: Thu Mar 17, 2022 3:18 pm

Re: "A possible error ocurred when accessing the JIWA databa  Topic is solved

Postby Mike.Sheen » Thu Mar 31, 2022 10:59 am

oliverbrooke wrote:Ok great - thanks for that info...
I'm told that the API is v.7.2.1.1.2 - good?


Nope - you want 7.2.1.16 or later. In version 7.2.1.16 of that plugin we made the most recent change that impacts possible connection pool exhaustion - DEV-9205.

That plugin requires 7.2.1 SR10 or later to be installed. Installing 7.2.1 SR10 will include an IIS package that you can unzip and extract the latest REST API plugin from - even if you're not using IIS and instead using self hosted, this is where you would get the latest plugin from when installing SR10.
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: "A possible error ocurred when accessing the JIWA databa

Postby oliverbrooke » Thu Mar 31, 2022 11:03 am

Thank you Mike :)
oliverbrooke
Occasional Contributor
Occasional Contributor
 
Posts: 10
Joined: Thu Mar 17, 2022 3:18 pm

Re: "A possible error ocurred when accessing the JIWA databa

Postby twofatmonkeys » Thu Mar 31, 2022 11:10 am

Thanks Mike, I'll schedule an update to install SR10 for this customer.

That should help with those 500's, of note also though in the logs are a large amount of 401's when the correct API key is clearly in the http query. I've just restarted the API and will monitor, I'll come back to you after upgrading to SR10 if it persists.
twofatmonkeys
I'm new here
I'm new here
 
Posts: 2
Joined: Thu Nov 18, 2021 6:03 pm

Re: "A possible error ocurred when accessing the JIWA databa

Postby oliverbrooke » Thu Mar 31, 2022 11:32 am

Hi Dirk - I dare say those 401s are me trying to authenticate incorrectly via cURL ;)
oliverbrooke
Occasional Contributor
Occasional Contributor
 
Posts: 10
Joined: Thu Mar 17, 2022 3:18 pm

Next

Return to REST API

Who is online

Users browsing this forum: No registered users and 1 guest