cancel
Showing results for 
Search instead for 
Did you mean: 

MaxConnectionReachedException listing dataproviders of documents

Former Member
0 Kudos

Hi guys,

I am using the BO Restful API to list data providers of Webi documents. The url is: http://bobi:6405/biprws/raylight/v1/documents/{document id}/dataproviders I am calling this url in a rapid succession for all previously gathered document ids. After a while I get a 400 error from the REST API, and I can see this:

"com.sap.bip.rs.cxf.providers.exceptions.RestRuntimeExceptionMapper||The resource of type 'Document' with identifier '13589' does not exist.

com.sap.webi.raylight.RaylightException: com.businessobjects.sdk.core.server.CommunicationException$MaxConnectionReachedException: The maximum connection limit has been reached. (Error: RWI 00000)"

in the WebApplicationContainerServer trace log.

When calling these dataproviders urls I can see the concurrent session count growing rapidly:

Why is listing a document dataprovider opening another session? How can I list dataproviders without opening new sessions? Is this a bug, or is this expected to happen?

Thx.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If you open a web intelligence document, you use one connection for the report on the webi intelligence processing server. This is the expected behavior and it is how this works, while you open reports from BILaunchpad as well.

You would need to close the document to release the session.

Refer to the thread below which is answered for a similar issue.

Thanks,

Prithvi

Former Member
0 Kudos

Thank you Prithvi!

You are right, opening a document indeed opens a connection. I followed the linked thread, implemented the document closing mechanism. But unfortunately I do still have too many connections in a short period. Maybe I will have to query slower the dataproviders. I will try to correct it for the next couple of days, and came back with some followup data. If nothing changes, I'll mark your answer as correct.

Cheers,

Domonkos

former_member197386
Active Contributor
0 Kudos

Hi Domonkos,

In a such case, you could:

- either increase the number of available connections in backend side (configured into CMC) or addd a new Webi server for instance

- or make sure your program will not launch too many parallel threads

Best regards,

Anthony

Former Member
0 Kudos

Hi Anthony,

unfortunately those are not real options. I am using the REST API to gather information on what universe objects are used by which queries. I have to go over all the dataprovider details and dataprovider specifications of all documents. Consider a system with hundreds or thousands of documents. Right now I can fill all the available active sessions of Web Intelligence Processing Server just by listing data providers of a document (meaning opening a document through the REST API), despite closing the documents after every "open". It does not really matter if I increase the number of connections (from the default 50) to 100 or 200 because it will be filled up quickly too. As of my understanding these connections are now idle, and they will be gathered after a while. I think that this idle time setting is called:

Do you know maybe another RESTful method to list the used objects of a universe?

Thx,

Domonkos

former_member197386
Active Contributor
0 Kudos

Hello Domonkos,

Thanks for the explanation of your process. The RESTful API is often used for this kind of batch job, so I don't understand why closing document after each use doesn't fix your problem...

You sent a [PUT] /documents/{docId}

with body content :

<document><state>Unused</state></document>

Right?

Anthony

Former Member
0 Kudos

Thank you Anthony, you have saved me from my misery!

After countless hours of debugging, I've noticed in your post that your body content has "Unused" with the capital 'U'. Unfortunately I've sent "unused" with a lower case 'u'.

Changing that resulted in this:

Before (count of active sessions, with "unused"):

After (count of active sessions, with "Unused"):

So this minuscule difference made the day.

So why didn't I find this before? Because the API responds with the same response in both cases!

Here is test sending "FooBar" as state:

A wrong request would result in a response message for a successful unload request stated in the documentation, and even the document would be reported closed ("Unused") after checking its state. But the active session wouldn't be closed.

I am on version 14.0.12.1946, so this may or may not be the case in future versions.

I could say it was fun, but it was just a mayor pain in the ... 

Thanks again Anthony and Prithvi!

Cheers,

Domonkos

eric_festinger
Contributor
0 Kudos

hi Domonkos,

I just tried the same thing as in your last post... and... oops! nor "unused" (with a lowercase), nor any other unrecognized content throws an error in json, whereas it is correctly handled in XML.

We'll look at it.

Regards,

eric

[EDIT] No error is thrown on 4.0 SP12 as in your case, but one is thrown in the more recent releases.

Former Member
0 Kudos

Thx Eric,

trying a newer version/sp/patch would have been the next logical debug step. In retrospect I should have done this earlier. It doesn't really matter now, because using the right case sensitive word does the job. Maybe this post will help somebody in the future.

Regards,

Domonkos

former_member197386
Active Contributor
0 Kudos

Hi Domonkos,

Yes, thanks for sharing this experience. Be sure we're still improving API experience based on such feedbacks.

Best regards,

Anthony

Answers (0)