Create by REST fails randomly

We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
Tomas_Fic
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Wed Dec 19, 2018 3:40 pm

Create by REST fails randomly

Post by Tomas_Fic » Wed Dec 19, 2018 3:51 pm

Hello

Within a test of 5000 documents consecutively (not parallel way) into OpenKM already containing 30 000 document I randomly receive the exception

Code: Select all

WARN  o.apache.cxf.jaxrs.utils.JAXRSUtils - No operation matching request path "/OpenKM/services/rest/document/getContent" is found, Relative Path: /getContent, HTTP Method: POST, ContentType: application/json, Accept: application/json,application/json,. Please enable FINE/TRACE log level for more details.
2018-12-19 11:41:35,564 [http-bio-0.0.0.0-8090-exec-232] [] WARN  o.a.c.j.i.WebApplicationExceptionMapper - javax.ws.rs.ClientErrorException
        at org.apache.cxf.jaxrs.utils.SpecExceptions.toHttpException(SpecExceptions.java:110)
        at org.apache.cxf.jaxrs.utils.ExceptionUtils.toHttpException(ExceptionUtils.java:149)
        at org.apache.cxf.jaxrs.utils.JAXRSUtils.findTargetMethod(JAXRSUtils.java:477)
I use the configuration:
VMWare 12 Pro
Memory 16 GB
1 proc - 4 cores
Centos 7 Server
Java 1.8
Tomcat 8.2.5
PostgreSQL 9.2.24
OpenKM Community 6.3.4

Any idea what this can be?

Thanks a lot in advance

jllort
Moderator
Moderator
Posts: 10671
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Create by REST fails randomly

Post by jllort » Mon Dec 24, 2018 3:25 pm

I suggest upgrade to latest version 6.4.6 or current development 6.4.7 what is only available from github repositories ( https://docs.openkm.com/kcenter/view/ok ... guide.html )

getContent method is not a document creation method is for getting binary data yet uploaded, why are you using it ? hast not much sense using getContent in combination of creation process ?

Tomas_Fic
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Wed Dec 19, 2018 3:40 pm

Re: Create by REST fails randomly

Post by Tomas_Fic » Sun Jan 06, 2019 7:15 pm

Hello

Sorry, my fault.

GetContent is used within the read by other user at the time of the creation. But the exception is the same for creating. Read and create must have something in common. The result of all this is that the document is not created.

As for the higher version - I cannot upgrade to the higher version. By the way, there is no 6.4.7 on the community edition, but only 6.3.6.

It seems that Tomcat has some trouble with REST endpoint management under a large number of incoming requests to create a document (but I repeat, documents are created one by one seriously and not in parallel).

jllort
Moderator
Moderator
Posts: 10671
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Create by REST fails randomly

Post by jllort » Mon Jan 07, 2019 3:50 pm

Version 6.4.7 is the current github master branch. You can compile from there, in few weeks or days we will proceed with community release and we are not expecting changes from what is currently in the master branch.

About concurrency, until the stream has not been sent to the API, the document creation does not start. Might be a small lock for creation ( database insert , uuid creation ) when binary blob data is in server side, but while uploading, sure should going parallel.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests