Please specify in the API documentation what maximum chunk_size can be used. For example, my laptop has 8 GB RAM, and if program tries to insert barely 100 MB list into SQLite DB, OS hangs.
while True:
if sys.getsizeof(fragment) / 1e8 > done_commits + 1:
table.insert_many(fragment, chunk_size=len(fragment))
fragment.clear()
done_commits += 1
Do you have a strict limit that can be correct all database errors? Otherwise I'd argue that this is an application-level concern to sort out and we cannot give guidance on this.
Please specify in the API documentation what maximum chunk_size can be used. For example, my laptop has 8 GB RAM, and if program tries to insert barely 100 MB list into SQLite DB, OS hangs.