Page 1 of 2

"A possible error ocurred when accessing the JIWA database"

PostPosted: Tue Mar 29, 2022 2:40 pm
by oliverbrooke
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

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

PostPosted: Tue Mar 29, 2022 3:26 pm
by Scott.Pearce
What is the version number of the REST API plugin you are using? i.e. look in Plugin Maintenance.

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

PostPosted: Tue Mar 29, 2022 5:28 pm
by oliverbrooke
Hi Scott,
I don't have a clue - I can send you the link to the endpoint if that helps?

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

PostPosted: Wed Mar 30, 2022 8:57 am
by oliverbrooke
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...?

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

PostPosted: Wed Mar 30, 2022 11:00 am
by Mike.Sheen
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.

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

PostPosted: Thu Mar 31, 2022 9:07 am
by oliverbrooke
Ok great - thanks for that info...
I'm told that the API is v.7.2.1.1.2 - good?

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

PostPosted: Thu Mar 31, 2022 10:59 am
by Mike.Sheen
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.

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

PostPosted: Thu Mar 31, 2022 11:03 am
by oliverbrooke
Thank you Mike :)

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

PostPosted: Thu Mar 31, 2022 11:10 am
by twofatmonkeys
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.

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

PostPosted: Thu Mar 31, 2022 11:32 am
by oliverbrooke
Hi Dirk - I dare say those 401s are me trying to authenticate incorrectly via cURL ;)