From e3e75ae0e866d3571612b4b769ae5214bf8daf67 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 3 Apr 2024 15:31:26 +0300 Subject: Reduce size of data inserted per query Reduce the size of data inserted per query since MariDB allows a packet with a maximum size of 1GB. This should hopefully resolve the …OperationalError: (2006, 'Server has gone away') error. --- scripts/rqtl2/install_genotypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/rqtl2/install_genotypes.py') diff --git a/scripts/rqtl2/install_genotypes.py b/scripts/rqtl2/install_genotypes.py index 709fe0f..d0731a2 100644 --- a/scripts/rqtl2/install_genotypes.py +++ b/scripts/rqtl2/install_genotypes.py @@ -176,7 +176,7 @@ def install_genotypes(#pylint: disable=[too-many-arguments, too-many-locals] cdata = rqtl2.control_data(zfile) genotypes = rqtl2.genotype_data(zfile) while True: - batch = tuple(take(genotypes, 5000)) + batch = tuple(take(genotypes, 1000)) if len(batch) == 0: logger.info("Loading Genotypes complete!") logger.info( -- cgit v1.2.3