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

0 votes


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,"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: {"app42Fault":{"httpErrorCode":500,"appErrorCode":1500,"message":"Internal Server Error","details":"Internal Server Error. Please try again"}}




at com.shephertz.app42.paas.customcode.numbersservice.NumbersService.sendChallenge(

at com.shephertz.app42.paas.customcode.numbersservice.NumbersService.action(

at com.shephertz.app42.paas.customcode.shared.MS.WrapExecute(

at com.shephertz.app42.paas.customcode.numbersservice.NumbersService.execute(

at com.mixelweb.customcode.tester.shared.CustomCodeTester.ExecuteLocalLoginService(

at com.mixelweb.customcode.tester.numbersservice.TestNumbersService.main(

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.

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

1 Answer

0 votes


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