Internal server error (500/1500) on StorageService.findDocumentsByQueryWithPaging

0 votes

hello

I have some custom code that needs to fetch a random row from a collection.

I do as follows: first I count all rowsfrom the table

int numeroMatrici = MS.adminStorageService.findAllDocumentsCount(MS.DB_NAME, MS.MATRIX0_COLLECTION_NAME).getTotalRecords()-3;

then I roll a random index and extract the single row with thata index

int tmp = (int)(Math.random()*numeroMatrici);

sfide0 = MS.adminStorageService.findDocumentsByQueryWithPaging(MS.DB_NAME,MS.MATRIX0_COLLECTION_NAME, QueryBuilder.build("extracted", 0, Operator.EQUALS), 1, tmp ).getJsonDocList();

it worked until yesterday, when I had 1791 rows in the collection

then I added new data to it, for a total of 18950 rows.

now, if the extracted index is greater than 5636 it returns the following exception:

com.shephertz.app42.paas.sdk.java.App42Exception: {"app42Fault":{"httpErrorCode":500,"appErrorCode":1500,"message":"Internal Server Error","details":"Internal Server Error. Please try again"}}

at com.shephertz.app42.paas.sdk.java.connection.RESTConnectorAsync.handleException(RESTConnectorAsync.java:318)

at com.shephertz.app42.paas.sdk.java.connection.RESTConnectorAsync.executeGet(RESTConnectorAsync.java:96)

at com.shephertz.app42.paas.sdk.java.storage.StorageService.findDocumentsByQueryWithPaging(StorageService.java:871)

at com.shephertz.app42.paas.customcode.numbersservice.NumbersService.sendChallenge(NumbersService.java:1002)

at com.shephertz.app42.paas.customcode.numbersservice.NumbersService.action(NumbersService.java:110)

at com.shephertz.app42.paas.customcode.shared.MS.WrapExecute(MS.java:106)

at com.shephertz.app42.paas.customcode.numbersservice.NumbersService.execute(NumbersService.java:59)

at com.mixelweb.customcode.tester.shared.CustomCodeTester.ExecuteLocalLoginService(CustomCodeTester.java:23)

at com.mixelweb.customcode.tester.numbersservice.TestNumbersService.main(TestNumbersService.java:118)

note: all rows in the collection have the "extracted" field set to 0, I checked by exporting the CSV from the web panel

asked Jan 22, 2015 in App42 Cloud API-BaaS by service (10 points)
Thanks for sharing all the details with us. We are looking into it & will update you soon for this. Thanks for your patience & co-operation with us.

Himanshu Sharma
Could you please share some more details like your app name, data base name & collection name in which you are having this issue? It will help us to replicate the same at our end.

Thanks,
Himanshu Sharma
App name: ACLPublicRead
DB name: TestDb
Collection: Matrix0_Collection

1 Answer

0 votes

Hello,

The problem was due to increase in size of your collection. We have rectified this problem from our end & allowed large data size incollection. Please check & let us know if it helps.

Himanshu Sharma

answered Jan 27, 2015 by hs00105 (2,005 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...