citp / BlockSci

A high-performance tool for blockchain science and exploration
https://citp.github.io/BlockSci/
GNU General Public License v3.0
1.34k stars 259 forks source link

Too many files while use blocksci through crontab #446

Open TOP-Youya opened 3 years ago

TOP-Youya commented 3 years ago

Hi, thanks for the great work. I have a problem while using blocksci by cron. if I run a python file in linux terminal , the blocksci can be used as normal, but while i add this python file as a cron task ,the blocksci will throw a exception.

Traceback (most recent call last): File "/root/btc_search/filter_btc.py", line 15, in <module> CHAIN = blocksci.Blockchain(config.BLOCKSCI) File "/root/BlockSci/blockscipy/blocksci/__init__.py", line 296, in new_init old_init(self, loc) RuntimeError: Could not open hash index with error: While opendir: /root/.bitcoin/blocksci_data/hashIndex: Too many open files ~

import blocksci
try:
        CHAIN = blocksci.Blockchain(config.BLOCKSCI)
        print(1)
    except Exception as e:
        print(e)

about "too many files ", I have googled about a solution by changing system config “open files”,but it does't work.

System Information

Using AMI: no
BlockSci version: (please provide a commit id if you're on a development branch)
Blockchain: bitcoin
Parser: Disk ,RPC Total memory: 64GB