How to reduce OpenEMR REST API response time?

I’m facing some critical issues with the response time. It’s nearly taking more than 2 seconds for every API to respond.

To be clearer, patient API with around 80 records in FHIR API takes more than 1 second. Is there any quick solution to reduce this issue?

Most likely its something going on in the database. I’d check the database when you are doing an API call. Look to see if an an index somehow wasn’t created on the database, or if you need to add an index. See if there is a particular query that is taking too long by checking the process list.

SHOW FULL PROCESSLIST

Grab the query and use EXPLAIN <query> replace with the query that is being executed in the process list and that will help you identify where things are getting stuck.

1 Like