How to configure the Batch Size
# support
a
I'm trying to insert a Bundle batch with 1000 JSON PatientResource records, but I get the following message: An error was encountered: { "resourceType": "OperationOutcome", "issue": [ { "severity": "fatal", "code": "invalid", "diagnostics": "\r\n413 Request Entity Too Large\r\n\r\n413 Request Entity Too Large\r\nnginx\r\n\r\n\r\n" } ], "text": { "status": "generated", "div": "\r\n413 Request Entity Too Large\r\n\r\n413 Request Entity Too Large\r\nnginx\r\n\r\n\r\n" } } Any suggestions on where I can configure this parameter in Meplum, so that it accepts more than 1000 JSON records in a single Bundle? I've already tried setting the maxJsonSize variable to "1024mb" in the /packages/server/medplum.config.json file but without success.
r
hi @Adriano Freitas , what is the size, in MB, of your current bundle? Depending on the size, it might need ot be split up
a
Each batch of 1000 JSON records is approximately 30mb. I have a partial database with 10,000 records, I separated it into a loop that collects 1000 by 1000 and inserts a batch of 1000 records at a time. The intention is to gradually increase it, but currently it is not accepting 1000 registrations.
r
HI @Adriano Freitas , I'm sorry about this inconvenience. with 30MB, our server should be able to handle this. Quick question - are you submitting the bundle via the medplum app, or directly via an API call?
a
I am sending an Upsert (Post and Put) to the endpoint https://myhost:8103/fhir/R4/ with a Bundle header of type Batch. If you have another more performant way than this, you can tell me and I'm accepting suggestions =))
r
I see. I believe the error you're getting is coming from nginx, not from medplum. You shouldn't need to use nginx for medplum server - my suggestion earlier was just for the medplum app 🙂 The medplum server is built on top of the express Nodejs server (https://expressjs.com/), so you shouldn't need to wrap in another http server.
Hopefully, you can leverage our pre-built docker images here: https://hub.docker.com/r/medplum/medplum-server
a
But of course I will use it! Thank you for clarifying the server issue, this will be analyzed and I will take it into consideration. And now I can also test the image that you made available on Docker, I didn't know. Rahul, if you could help me now with the Google reCaptcha issue, I would greatly appreciate it!