# Buggy code
def _batched_select(transaction, query, parameters):
    for start_index in range(0, len(parameters), 900):
        current_batch = parameters[start_index : start_index + 900]
        bind = "({})".format(",".join("?" for _ in range(len(current_batch))))
        for result in transaction.execute(query.format(bind), current_batch):
            yield result


# Traceback (OperationalError)
2018-08-01 19:15:31,421 INFO     lbrynet.daemon.Downloader:93: Download lbry://getbitcoincashoutofelectrumin60seconds status changed to initializing
2018-08-01 19:15:31,424 INFO     lbrynet.daemon.Downloader:93: Download lbry://getbitcoincashoutofelectrumin60seconds status changed to downloading_metadata
2018-08-01 19:15:32,237 INFO     lbrynet.core.client.BlobRequester:417: Offered rate 0.000000/mb accepted by 47.17.162.103
2018-08-01 19:15:32,239 INFO     lbrynet.core.client.BlobRequester:490: Requesting blob e6cff236d7c84a2a848de826f223a9ca9d7b80186f8b5c1b583ea9373a8e9781f64ac4ca1b1d6cb4db81af74c28ee57b from 47.17.162.103:3335
2018-08-01 19:15:32,247 INFO     lbrynet.core.client.BlobRequester:566: Blob e6cff236d7c84a2a has been successfully downloaded from 47.17.162.103:3335
2018-08-01 19:15:32,447 INFO     lbrynet.daemon.Downloader:186: Downloading lbry://getbitcoincashoutofelectrumin60seconds (e6cff2) --> D:\LBRY Downloads Main PC\Get Bitcoin Cash out of Electrum in 60 Seconds.mp4
2018-08-01 19:15:32,447 INFO     lbrynet.daemon.Downloader:93: Download lbry://getbitcoincashoutofelectrumin60seconds status changed to running
2018-08-01 19:15:33,174 INFO     lbrynet.core.client.BlobRequester:417: Offered rate 0.000000/mb accepted by 47.17.162.103
2018-08-01 19:15:33,174 INFO     lbrynet.core.client.BlobRequester:490: Requesting blob 34f342bbc6a55124bac0790a8bb49bae9f19d60ffda10db4f9b6529bb502551336dee6afc0e091321322a34772628ccb from 47.17.162.103:3335
2018-08-01 19:15:33,507 INFO     lbrynet.core.client.BlobRequester:566: Blob 34f342bbc6a55124 has been successfully downloaded from 47.17.162.103:3335
2018-08-01 19:15:33,801 INFO     lbrynet.core.client.BlobRequester:490: Requesting blob c4270404dbb1040579db29e03dd63402fda49c34a3fbd3b4a95814b3692a685fd866ae83097871b8b10077362aec530a from 47.17.162.103:3335
2018-08-01 19:15:34,086 INFO     lbrynet.core.client.BlobRequester:566: Blob c4270404dbb10405 has been successfully downloaded from 47.17.162.103:3335
2018-08-01 19:15:34,089 INFO     lbrynet.core.client.BlobRequester:490: Requesting blob 2f41b535acff0046f5f5b12c879bb1b35fc71ffba00291602e6c5ebaf88d2553020eaf6e77f21ab9c3097f83186050da from 47.17.162.103:3335
2018-08-01 19:15:34,190 INFO     lbrynet.core.client.BlobRequester:566: Blob 2f41b535acff0046 has been successfully downloaded from 47.17.162.103:3335
2018-08-01 19:15:34,493 INFO     lbrynet.daemon.Downloader:93: Download lbry://getbitcoincashoutofelectrumin60seconds status changed to stopped
2018-08-01 19:15:34,493 INFO     lbrynet.daemon.Downloader:149: Finished downloading lbry://getbitcoincashoutofelectrumin60seconds (e6cff2) --> D:\LBRY Downloads Main PC\Get Bitcoin Cash out of Electrum in 60 Seconds.mp4
2018-08-01 19:15:39,910 INFO     lbrynet.daemon.Daemon:1805: Deleted file: Get Bitcoin Cash out of Electrum in 60 Seconds.mp4
2018-08-01 19:15:48,651 INFO     lbrynet.daemon.Downloader:93: Download lbry://getbitcoincashoutofelectrumin60seconds status changed to initializing
2018-08-01 19:15:48,651 INFO     lbrynet.daemon.Downloader:93: Download lbry://getbitcoincashoutofelectrumin60seconds status changed to downloading_metadata
2018-08-01 19:15:49,378 INFO     lbrynet.core.client.BlobRequester:417: Offered rate 0.000000/mb accepted by 47.17.162.103
2018-08-01 19:15:49,378 INFO     lbrynet.core.client.BlobRequester:490: Requesting blob e6cff236d7c84a2a848de826f223a9ca9d7b80186f8b5c1b583ea9373a8e9781f64ac4ca1b1d6cb4db81af74c28ee57b from 47.17.162.103:3335
2018-08-01 19:15:49,384 INFO     lbrynet.core.client.BlobRequester:566: Blob e6cff236d7c84a2a has been successfully downloaded from 47.17.162.103:3335
2018-08-01 19:15:49,687 INFO     lbrynet.daemon.Downloader:186: Downloading lbry://getbitcoincashoutofelectrumin60seconds (e6cff2) --> D:\LBRY Downloads Main PC\Get Bitcoin Cash out of Electrum in 60 Seconds.mp4
2018-08-01 19:15:49,687 INFO     lbrynet.daemon.Downloader:93: Download lbry://getbitcoincashoutofelectrumin60seconds status changed to running
2018-08-01 19:15:50,513 INFO     lbrynet.core.client.BlobRequester:417: Offered rate 0.000000/mb accepted by 47.17.162.103
2018-08-01 19:15:50,513 INFO     lbrynet.core.client.BlobRequester:490: Requesting blob 34f342bbc6a55124bac0790a8bb49bae9f19d60ffda10db4f9b6529bb502551336dee6afc0e091321322a34772628ccb from 47.17.162.103:3335
2018-08-01 19:15:50,831 INFO     lbrynet.core.client.BlobRequester:566: Blob 34f342bbc6a55124 has been successfully downloaded from 47.17.162.103:3335
2018-08-01 19:15:50,834 INFO     lbrynet.core.client.BlobRequester:490: Requesting blob c4270404dbb1040579db29e03dd63402fda49c34a3fbd3b4a95814b3692a685fd866ae83097871b8b10077362aec530a from 47.17.162.103:3335
2018-08-01 19:15:51,167 INFO     lbrynet.core.client.BlobRequester:566: Blob c4270404dbb10405 has been successfully downloaded from 47.17.162.103:3335
2018-08-01 19:15:51,168 INFO     lbrynet.core.client.BlobRequester:490: Requesting blob 2f41b535acff0046f5f5b12c879bb1b35fc71ffba00291602e6c5ebaf88d2553020eaf6e77f21ab9c3097f83186050da from 47.17.162.103:3335
2018-08-01 19:15:51,279 INFO     lbrynet.core.client.BlobRequester:566: Blob 2f41b535acff0046 has been successfully downloaded from 47.17.162.103:3335
2018-08-01 19:15:51,767 INFO     lbrynet.dht.hashannouncer:54: Announcing 2 blobs
2018-08-01 19:15:51,779 INFO     lbrynet.daemon.Downloader:93: Download lbry://getbitcoincashoutofelectrumin60seconds status changed to stopped
2018-08-01 19:15:51,779 INFO     lbrynet.daemon.Downloader:149: Finished downloading lbry://getbitcoincashoutofelectrumin60seconds (e6cff2) --> D:\LBRY Downloads Main PC\Get Bitcoin Cash out of Electrum in 60 Seconds.mp4
2018-08-01 19:15:57,322 INFO     lbrynet.dht.hashannouncer:72: Took 5.55400013924 seconds to announce 2 of 2 attempted hashes (0.000000 hashes per second)
2018-08-01 19:15:59,857 INFO     lbrynet.daemon.Daemon:1805: Deleted file: Get Bitcoin Cash out of Electrum in 60 Seconds.mp4
2018-08-01 19:16:18,078 INFO     lbrynet.core.Wallet:411: Skipping dust
2018-08-01 19:16:18,749 INFO     lbrynet.daemon.Downloader:93: Download lbry://getbitcoincashoutofelectrumin60seconds status changed to initializing
2018-08-01 19:16:18,750 INFO     lbrynet.daemon.Downloader:93: Download lbry://getbitcoincashoutofelectrumin60seconds status changed to downloading_metadata
2018-08-01 19:16:19,477 INFO     lbrynet.core.client.BlobRequester:417: Offered rate 0.000000/mb accepted by 47.17.162.103
2018-08-01 19:16:19,479 INFO     lbrynet.core.client.BlobRequester:490: Requesting blob e6cff236d7c84a2a848de826f223a9ca9d7b80186f8b5c1b583ea9373a8e9781f64ac4ca1b1d6cb4db81af74c28ee57b from 47.17.162.103:3335
2018-08-01 19:16:19,486 INFO     lbrynet.core.client.BlobRequester:566: Blob e6cff236d7c84a2a has been successfully downloaded from 47.17.162.103:3335
2018-08-01 19:16:19,776 INFO     lbrynet.daemon.Downloader:186: Downloading lbry://getbitcoincashoutofelectrumin60seconds (e6cff2) --> D:\LBRY Downloads Main PC\Get Bitcoin Cash out of Electrum in 60 Seconds.mp4
2018-08-01 19:16:19,776 INFO     lbrynet.daemon.Downloader:93: Download lbry://getbitcoincashoutofelectrumin60seconds status changed to running
2018-08-01 19:16:20,522 INFO     lbrynet.core.client.BlobRequester:417: Offered rate 0.000000/mb accepted by 47.17.162.103
2018-08-01 19:16:20,523 INFO     lbrynet.core.client.BlobRequester:490: Requesting blob 34f342bbc6a55124bac0790a8bb49bae9f19d60ffda10db4f9b6529bb502551336dee6afc0e091321322a34772628ccb from 47.17.162.103:3335
2018-08-01 19:16:20,838 WARNING  lbrynet.core.client.BlobRequester:293: An error occurred while downloading 34f342bbc6a55124bac0790a8bb49bae9f19d60ffda10db4f9b6529bb502551336dee6afc0e091321322a34772628ccb from 47.17.162.103:3335. Error: Traceback (most recent call last):
Failure: lbrynet.core.Error.InvalidDataError: blob hash is bb6a484ebae897012c6bae1a31a7b0ffa96521574b0a620d569d6120730185458537e08ba776160dfc5b7dc39b6936ca vs expected 34f342bbc6a55124bac0790a8bb49bae9f19d60ffda10db4f9b6529bb502551336dee6afc0e091321322a34772628ccb

2018-08-01 19:16:20,838 WARNING  lbrynet.core.client.ClientProtocol:188: The connection to 47.17.162.103:3335 is closing due to: [Failure instance: Traceback (failure with no frames): <class 'lbrynet.core.Error.InvalidDataError'>: blob hash is bb6a484ebae897012c6bae1a31a7b0ffa96521574b0a620d569d6120730185458537e08ba776160dfc5b7dc39b6936ca vs expected 34f342bbc6a55124bac0790a8bb49bae9f19d60ffda10db4f9b6529bb502551336dee6afc0e091321322a34772628ccb
]
2018-08-01 19:16:20,838 WARNING  lbrynet.core.client.ClientProtocol:188: The connection to 47.17.162.103:3335 is closing due to: [Failure instance: Traceback (failure with no frames): <class 'lbrynet.core.Error.InvalidDataError'>: blob hash is bb6a484ebae897012c6bae1a31a7b0ffa96521574b0a620d569d6120730185458537e08ba776160dfc5b7dc39b6936ca vs expected 34f342bbc6a55124bac0790a8bb49bae9f19d60ffda10db4f9b6529bb502551336dee6afc0e091321322a34772628ccb
]
2018-08-01 19:16:20,839 INFO     lbrynet.core.client.ClientProtocol:229: blob hash is bb6a484ebae897012c6bae1a31a7b0ffa96521574b0a620d569d6120730185458537e08ba776160dfc5b7dc39b6936ca vs expected 34f342bbc6a55124bac0790a8bb49bae9f19d60ffda10db4f9b6529bb502551336dee6afc0e091321322a34772628ccb
2018-08-01 19:16:20,839 INFO     lbrynet.core.client.ClientProtocol:231: The connection to 47.17.162.103:3335 is closing due to an error: Traceback (most recent call last):
Failure: lbrynet.core.Error.InvalidDataError: blob hash is bb6a484ebae897012c6bae1a31a7b0ffa96521574b0a620d569d6120730185458537e08ba776160dfc5b7dc39b6936ca vs expected 34f342bbc6a55124bac0790a8bb49bae9f19d60ffda10db4f9b6529bb502551336dee6afc0e091321322a34772628ccb

2018-08-01 19:16:20,839 WARNING  lbrynet.core.client.ClientProtocol:238: Not asking for another request from 47.17.162.103:3335
2018-08-01 19:16:21,746 INFO     lbrynet.dht.hashannouncer:54: Announcing 1 blobs
2018-08-01 19:16:26,589 INFO     lbrynet.dht.hashannouncer:72: Took 4.84200000763 seconds to announce 1 of 1 attempted hashes (0.000000 hashes per second)
2018-08-01 19:17:18,285 INFO     lbrynet.core.Wallet:411: Skipping dust
2018-08-01 19:17:28,733 INFO     lbrynet.daemon.Daemon:1692: Already waiting on lbry://getbitcoincashoutofelectrumin60seconds to start downloading
2018-08-01 19:18:05,559 INFO     lbrynet.daemon.DaemonControl:84: Starting lbrynet-daemon from command line
2018-08-01 19:18:17,280 INFO     lbrynet.database.storage:174: connecting to database: C:\Users\thoma\AppData\Roaming\lbrynet\lbrynet.sqlite
2018-08-01 19:18:17,282 INFO     lbrynet.daemon.DaemonServer:65: Using non-authenticated API
2018-08-01 19:18:17,283 INFO     lbrynet.daemon.DaemonServer:42: lbrynet API listening on TCP localhost:5279
2018-08-01 19:18:17,283 INFO     lbrynet.daemon.Daemon:242: Starting lbrynet-daemon
2018-08-01 19:18:17,305 INFO     lbrynet.daemon.ExchangeRateManager:217: Starting exchange rate manager
2018-08-01 19:18:18,451 INFO     lbrynet.daemon.Daemon:284: Platform: {"lbrynet_version": "0.20.4", "platform": "Windows-10-10.0.15063", "os_system": "Windows", "python_version": "2.7.15", "os_release": "10", "lbryum_version": "3.2.3", "ip": "47.17.162.103", "lbryschema_version": "0.0.16", "processor": "Intel64 Family 6 Model 60 Stepping 3, GenuineIntel", "build": "release"}
2018-08-01 19:18:18,453 INFO     lbrynet.daemon.Daemon:487: Loading databases
2018-08-01 19:18:18,459 INFO     lbrynet.daemon.Daemon:1141: Get version info: {"lbrynet_version": "0.20.4", "platform": "Windows-10-10.0.15063", "os_system": "Windows", "python_version": "2.7.15", "os_release": "10", "lbryum_version": "3.2.3", "ip": "47.17.162.103", "lbryschema_version": "0.0.16", "processor": "Intel64 Family 6 Model 60 Stepping 3, GenuineIntel", "build": "release"}
2018-08-01 19:18:18,469 INFO     lbrynet.daemon.Daemon:542: Using lbryum wallet
2018-08-01 19:18:18,493 INFO     lbrynet.core.Session:185: Set UPnP redirect 47.17.162.103:3222 (TCP) to 192.168.0.6:3222
2018-08-01 19:18:18,509 INFO     lbrynet.core.Session:185: Set UPnP redirect 47.17.162.103:44445 (UDP) to 192.168.0.6:44445
2018-08-01 19:18:19,532 INFO     lbrynet.dht.protocol:202: DHT listening on UDP 47.17.162.103:44445
2018-08-01 19:18:19,532 INFO     lbrynet.core.RateLimiter:72: Starting rate limiter.
2018-08-01 19:18:19,619 INFO     lbrynet.dht.node:249: Attempting to join the DHT network, 0 contacts known so far
2018-08-01 19:18:20,349 INFO     lbrynet.core.Wallet:157: lbryumx2.lbry.io:50001 height: 412966, local height: 412966
2018-08-01 19:18:20,349 INFO     lbrynet.core.Wallet:196: Starting wallet.
2018-08-01 19:18:20,448 INFO     lbrynet.core.Wallet:984: Loading the wallet
2018-08-01 19:18:22,502 WARNING  lbrynet.core.Wallet:1066: Your wallet is excessively large (3054 addresses), please follow instructions here: https://github.com/lbryio/lbry/issues/437 to reduce your wallet size
2018-08-01 19:18:25,852 INFO     lbrynet.core.Wallet:1081: Local Height: 412966, remote height: 412966, behind: 0
2018-08-01 19:18:25,854 INFO     lbrynet.core.Wallet:1089: Wallet Loaded
2018-08-01 19:18:25,854 INFO     lbrynet.core.Wallet:1007: Subscribing to addresses
2018-08-01 19:18:26,161 INFO     lbrynet.core.Wallet:1009: Synchronized wallet
2018-08-01 19:18:26,161 INFO     lbrynet.core.Wallet:1011: Set up lbryum command runner
2018-08-01 19:18:26,170 INFO     lbrynet.core.Wallet:957: Wallet is not encrypted
2018-08-01 19:18:26,180 INFO     lbrynet.daemon.Daemon:526: Starting the file manager
2018-08-01 19:18:26,194 ERROR    lbrynet.daemon.DaemonControl:118: Failed to start lbrynet-daemon
Traceback (most recent call last):
File "site-packages\lbrynet\daemon\DaemonControl.py", line 115, in start_server_and_listen
File "site-packages\twisted\internet\defer.py", line 1297, in _inlineCallbacks
File "site-packages\twisted\python\failure.py", line 389, in throwExceptionIntoGenerator
File "site-packages\lbrynet\daemon\DaemonServer.py", line 52, in start
File "site-packages\twisted\internet\defer.py", line 1297, in _inlineCallbacks
File "site-packages\twisted\python\failure.py", line 389, in throwExceptionIntoGenerator
File "site-packages\lbrynet\daemon\Daemon.py", line 257, in setup
File "site-packages\twisted\internet\defer.py", line 1297, in _inlineCallbacks
File "site-packages\twisted\python\failure.py", line 389, in throwExceptionIntoGenerator
File "site-packages\lbrynet\daemon\Daemon.py", line 529, in _setup_lbry_file_manager
File "site-packages\twisted\internet\defer.py", line 1297, in _inlineCallbacks
File "site-packages\twisted\python\failure.py", line 389, in throwExceptionIntoGenerator
File "site-packages\lbrynet\file_manager\EncryptedFileManager.py", line 46, in setup
File "site-packages\twisted\internet\defer.py", line 1297, in _inlineCallbacks
File "site-packages\twisted\python\failure.py", line 389, in throwExceptionIntoGenerator
File "site-packages\lbrynet\file_manager\EncryptedFileManager.py", line 119, in _start_lbry_files
File "site-packages\twisted\internet\defer.py", line 1297, in _inlineCallbacks
File "site-packages\twisted\python\failure.py", line 389, in throwExceptionIntoGenerator
File "site-packages\lbrynet\database\storage.py", line 752, in get_claims_from_stream_hashes
File "site-packages\twisted\python\threadpool.py", line 246, in inContext
File "site-packages\twisted\python\threadpool.py", line 262, in <lambda>
File "site-packages\twisted\python\context.py", line 118, in callWithContext
File "site-packages\twisted\python\context.py", line 81, in callWithContext
File "site-packages\twisted\enterprise\adbapi.py", line 477, in _runInteraction
File "site-packages\twisted\enterprise\adbapi.py", line 467, in _runInteraction
File "site-packages\lbrynet\database\storage.py", line 731, in _batch_get_claim
OperationalError: too many SQL variables
2018-08-01 19:18:26,214 INFO     lbrynet.daemon.DaemonServer:56: Stopping the reactor
2018-08-01 19:18:26,214 INFO     lbrynet.daemon.Daemon:420: Closing lbrynet session
2018-08-01 19:18:26,214 INFO     lbrynet.daemon.Daemon:421: Status at time of shutdown: loading_file_manager
2018-08-01 19:18:26,214 INFO     lbrynet.file_manager.EncryptedFileManager:148: Stopping 0 lbry files
2018-08-01 19:18:26,214 INFO     lbrynet.file_manager.EncryptedFileManager:252: Stopped encrypted file manager
2018-08-01 19:18:26,214 INFO     lbrynet.core.Session:141: Stopping session.
2018-08-01 19:18:26,214 INFO     lbrynet.core.RateLimiter:83: Stopping rate limiter.
2018-08-01 19:18:26,214 INFO     lbrynet.core.Wallet:208: Stopping wallet.
2018-08-01 19:18:26,280 INFO     lbrynet.core.Wallet:1036: Stopped wallet
2018-08-01 19:18:26,280 INFO     lbrynet.core.Wallet:1039: Stopped connection to lbryum server
2018-08-01 19:18:26,280 INFO     lbrynet.core.Session:263: Unsetting upnp for session
2018-08-01 19:18:26,282 INFO     lbrynet.dht.protocol:493: Stopping DHT
2018-08-01 19:18:26,282 INFO     lbrynet.dht.protocol:496: DHT stopped
2018-08-01 19:18:26,299 INFO     lbrynet.core.Session:277: Removed UPnP redirect for TCP 3222.
2018-08-01 19:18:26,313 INFO     lbrynet.core.Session:277: Removed UPnP redirect for UDP 44445.
2018-08-01 19:18:26,480 WARNING  lbrynet.analytics:257: Failed to send track event. Traceback (most recent call last):
Failure: twisted.web._newclient.RequestTransmissionFailed: [<twisted.python.failure.Failure twisted.internet.error.ConnectionLost: Connection to the other side was lost in a non-clean fashion: Connection lost.>]
({'timestamp': '2018-08-01T23:18:26.205000Z', 'userId': 'lbry', 'event': 'Server Startup Error', 'context': {'app': {'build': 'release', 'version': '0.20.4', 'name': 'lbrynet', 'wallet': {'version': '3.2.3', 'name': 'lbryum'}, 'python_version': '2.7.15'}, 'os': {'version': '10', 'name': 'Windows'}, 'library': {'version': '1.0.0', 'name': 'lbrynet-analytics'}}, 'properties': {'message': 'too many SQL variables', 'lbry_id': '3vbBV2oD6JvWcGsfWrhdfwKhqSD2bcqeZbMST4EGwXCS49Xf4R9tUaozmM7ZvAZ13B', 'session_id': '8zDSvzWrff3UfzWWAsEQBgWDzhPZHNAWvsgYpiN5QbapUFtxqTr6o1Lvx3vTimraWt'}})
2018-08-01 19:18:26,482 CRITICAL twisted:154: Unexpected exception from twisted.web.client.FileBodyProducer.stopProducing
Traceback (most recent call last):
File "site-packages\twisted\internet\endpoints.py", line 130, in connectionLost

File "site-packages\twisted\web\_newclient.py", line 929, in dispatcher

File "site-packages\twisted\web\_newclient.py", line 1599, in _connectionLost_TRANSMITTING

File "site-packages\twisted\web\_newclient.py", line 830, in stopWriting

--- <exception caught here> ---
File "site-packages\twisted\web\_newclient.py", line 194, in _callAppFunction

File "site-packages\twisted\web\client.py", line 1041, in stopProducing

File "site-packages\twisted\internet\task.py", line 497, in stop

File "site-packages\twisted\internet\task.py", line 507, in _checkFinish

twisted.internet.task.TaskStopped:

2018-08-01 19:18:26,483 CRITICAL twisted:154: Unhandled error in Deferred:
2018-08-01 19:18:26,483 CRITICAL twisted:154:
RequestTransmissionFailed: [<twisted.python.failure.Failure twisted.internet.error.ConnectionLost: Connection to the other side was lost in a non-clean fashion: Connection lost.>]
2018-08-01 19:18:26,483 CRITICAL twisted:154: Unexpected exception from twisted.web.client.FileBodyProducer.stopProducing
Traceback (most recent call last):
File "site-packages\twisted\internet\endpoints.py", line 130, in connectionLost

File "site-packages\twisted\web\_newclient.py", line 929, in dispatcher

File "site-packages\twisted\web\_newclient.py", line 1599, in _connectionLost_TRANSMITTING

File "site-packages\twisted\web\_newclient.py", line 830, in stopWriting

--- <exception caught here> ---
File "site-packages\twisted\web\_newclient.py", line 194, in _callAppFunction

File "site-packages\twisted\web\client.py", line 1041, in stopProducing

File "site-packages\twisted\internet\task.py", line 497, in stop

File "site-packages\twisted\internet\task.py", line 507, in _checkFinish

twisted.internet.task.TaskStopped:

2018-08-01 19:18:26,484 WARNING  lbrynet.analytics:257: Failed to send track event. Traceback (most recent call last):
Failure: twisted.web._newclient.ResponseNeverReceived: [<twisted.python.failure.Failure twisted.internet.error.ConnectionLost: Connection to the other side was lost in a non-clean fashion: Connection lost.>]
({'timestamp': '2018-08-01T23:18:26.171000Z', 'userId': 'lbry', 'event': 'Heartbeat', 'context': {'app': {'build': 'release', 'version': '0.20.4', 'name': 'lbrynet', 'wallet': {'version': '3.2.3', 'name': 'lbryum'}, 'python_version': '2.7.15'}, 'os': {'version': '10', 'name': 'Windows'}, 'library': {'version': '1.0.0', 'name': 'lbrynet-analytics'}}, 'properties': {'lbry_id': '3vbBV2oD6JvWcGsfWrhdfwKhqSD2bcqeZbMST4EGwXCS49Xf4R9tUaozmM7ZvAZ13B', 'session_id': '8zDSvzWrff3UfzWWAsEQBgWDzhPZHNAWvsgYpiN5QbapUFtxqTr6o1Lvx3vTimraWt'}})

# Fixed code
def _batched_select(transaction, query, parameters):
    for start_index in range(0, len(parameters), 900):
        current_batch = parameters[start_index : start_index + 900]
        bind = "({})".format(",".join(["?"] * len(current_batch)))
        for result in transaction.execute(query.format(bind), current_batch):
            yield result