Closed HebaruSan closed 1 year ago
Is this where the disk size is set?
du
on my local disk indicates that CKAN-meta is larger than 100 MB. CKAN-meta:
$ du -sh
217M .
NetKAN:
$ du -sh
126M .
Hmm, looks like that would be 100 GB, not MB:
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html
VolumeSize (request), volumeSize (response) The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.
It has also been skipping some runs.
Run skipped, below volume credit target percentage (Current Avg: 0)
The Mirrorer just came up with a new one:
Uncaught exception:
Traceback (most recent call last):
File ".local/bin/netkan", line 8, in <module>
sys.exit(netkan())
File "/home/netkan/.local/lib/python3.7/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/netkan/.local/lib/python3.7/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/netkan/.local/lib/python3.7/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/netkan/.local/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/netkan/.local/lib/python3.7/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/netkan/.local/lib/python3.7/site-packages/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/netkan/.local/lib/python3.7/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/netkan/.local/lib/python3.7/site-packages/netkan/cli/services.py", line 76, in mirrorer
).process_queue(common.queue, common.timeout)
File "/home/netkan/.local/lib/python3.7/site-packages/netkan/mirrorer.py", line 321, in process_queue
if self.try_mirror(CkanMirror(self.ia_collection, path)):
File "/home/netkan/.local/lib/python3.7/site-packages/netkan/mirrorer.py", line 353, in try_mirror
download_stream_to_file(source_url, tmp)
File "/home/netkan/.local/lib/python3.7/site-packages/netkan/common.py", line 54, in download_stream_to_file
dest_file.write(chunk)
File "/usr/local/lib/python3.7/tempfile.py", line 481, in func_wrapper
return func(*args, **kwargs)
OSError: [Errno 12] Cannot allocate memory
Tried merging all the pending CKAN-meta PRs to see if that reduces the needed disk space.
After a local git pull
and git gc
:
$ du -sh NetKAN CKAN-meta
56M NetKAN
209M CKAN-meta
So maybe we're using some kind of default disk volume 256 MB in size?
... It's still failing, same error.
Run skipped, below volume credit target percentage (Current Avg: 0)
Hmm, these seem to have happened on passes when we didn't get the error in the OP. Do we clone the repos before we check the credits? It would make more sense to check the credits first, since that check can stop the whole run.
... confirmed, the common.*_repo
calls clone the repos, before can_schedule
is called:
Cleaning that up might allow faster recovery of credits, since we'd be doing ~260 MB less network activity per aborted run.
Problem
The Scheduler has been printing this to Discord every 30 minutes starting about 7 hour ago (which means the bot is no longer running):
Maybe it's running out of disk space?