OHDSI Home | Forums | Wiki | Github

"ERROR: out of memory" when running Achilles exportMeasurementToJson

Hi All,

I am working on export json files of Achilles on my local computer with local database. However it spends me a lot of time doing “exportMeasurementToJson” in RStudio. After a long time, it raises ERROR: out of memory.

Is it because of my poor computer performance/memory size or large database table size? I am worried if there is something wrong with my code or configuration.

By the way, is it normal that it costs long time when run “achilles” function? I tried to run achilles() yesterday night. However there is no more progress today morning and there is no error. Thus I stop it. (my achilles() code is below)
achilles(connectionDetails = connectionDetails,
cdmDatabaseSchema = “japan_his”,
resultsDatabaseSchema=“japan_his”,
outputFolder = “output”)

Thanks,
Jiawei

I think the error is thrown by the Postgres server. Out of the box, Postgres is optimized for very simple queries, while in OHDSI we tend to use very complicated queries.

I highly recommend using PGTune to optimize the performance of your PostgreSQL database. Choose ‘Data warehouse’ as DB type. Once you’ve selected your system specifications, PGTune provides two ways to update your configuration: by manually editing your postgresql.conf file, or by issuing ALTER SYSTEM commands via a SQL client (like pgAdmin). I personally find the latter easier to use. Don’t forget to restart your server for the changes to take effect.

t