-
Notifications
You must be signed in to change notification settings - Fork 224
node: The number of files in Chain_xxx folder keeps growing rapidly when the plugin RpcNep5Tracker was installed. #419
Comments
Is expected, we index more information, and is stored there |
The direct reason should probably be that unreleased snapshots prevent leveldb compaction from deleting outdated ldb files, after observation & experiments. After looking into the leveldb log file on the specific problematic client, I observed that compactions failed to delete any outdated ldb file. I guessed that something such as snapshots prevent file deletion. My experiments & corresponding results are as follows:
So it's obvious that the reason of this issue should probably be conflicts between snapshots & compaction. I also observed that there are mulitple places in the code where snapshots are created but never released. We are testing to see whether the problem will re-occur after correction. |
@Qiao-Jin So is it a plugin bug? |
The problem might be indirectly caused by some problem in the plugin, say, some exceptions, but the direct reason should be some db snapshots failed to be released. I'm looking for the such snapshots in the code. |
Now RPCNep5Tracker exposed this bug. neo-cli works well without RPCNep5Tracker. |
So you believe the bug is in RpcNep5Tracker? I simply checked the RpcNep5Tracker code and found no problems. |
Yes, although there seems no obvious relationship between this plugin and this issue. But I've made tests many times for three days. You could try to sync two neo-cli in two different servers, one with RPCNepTracker and one without, syncing to the latest height and wait for four or five hours. You will find absolutely different results of available disk space. |
We retried the version removing ALL usage of func leveldb_create_snapshot in the code for a whole day, and this problem never occurs. |
FWIW I'm seeing the exact same issue occur on our node pool as well. This is a horrible hack way of working around this but we need the RpcNep5Tracker plugin on our nodes. Until somebody resolves the issue this is the (again admittedly horribly hacky) way I've worked around this problem. It's simply fired with a cron job every 15 minutes.
Note: I should also mention this syntax is based around the fact we have the neo-cli rpcserver being maintained as a systemd daemon. |
Some similiar bugs reported by leveldb users: |
Old, if remains, please re-open |
When I restart the neo-cli, the size of chain folder will be reduced to 12G, and number of files will be about 7k. Such as:
But the number and size will keep growing rapidly then.
Here is the screen shot, about 24 hours after my last retarting.
And as time goes on, growing......growing~
It seems that if the disk was large enough, the number of files would continue to increase.
Here is the screen shot of LOG file, seems no deleting after compacting.
Then, we found that when the plugin RpcNep5Tracker was not installed, this issue didn't appear.
The text was updated successfully, but these errors were encountered: