HelloZeroNet / HelloZeroNet/ZeroNet

ZeroNet WEB interface has been blocked by "Loaded json" message

未关闭
#1,955 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
18.8k
派生
2.3k
PR 合并指标
30 天内没有已合并 PR

描述

### Step 1: Please describe your environment

* ZeroNet version: **Current - 0.6.5 ba6a75f8d7c8d12**
* Operating system: **Centos 7**
* Web browser: **Chrome**
* Tor status: **available**
* Opened port: **yes**
* Special configuration:
```
multiuser_local

optional_limit = 1024
fileserver_ip_type=ipv4
log_dir=/zeronet/log
data_dir=/zeronet/data
fileserver_port=26552
fileserver_ip=0.0.0.0
use_openssl=true
ui_ip=127.0.0.1
download_optional=auto
ui_trans_proxy
autodownload_bigfile_size_limit = 3900
bigfile_size_limit = 5000
workers=10
connected_limit=20
global_connected_limit=2048
```

### Step 2: Describe the problem:

Web interface is not working correctly. I checked logs and saw, the web interface has been blocked by `Loaded json: ` command.

```[2019-04-03 14:21:58,394] DEBUG Site:1uPLoa..dmQc Loaded json: 44923100 (latest: data/users/1QHVkerVSwMQF8LtzEb5XQSZxGeu9dRHmL/content.json)```

#### Steps to reproduce:

I use ZeroFrame API to download (should be "to request", because **fileNeed** does not download files instantly) all files from ZeroUP (1uPLoaDwKzP6MCGoVzw48r4pxawRBdmQc) - (commands **optionalFileList** and **fileNeed**, where i added to filename '|all' at the end. I made similar on YouTube and KopyKate BIG OFFICIAL.

#### Observed Results:

After restart ZeroNet (I changed configuration) web interface not working correctly. In logs, I saw: `Loaded json: X` messages

```
[2019-04-03 07:19:54,146] DEBUG Site:1uPLoa..dmQc Loaded json: 100 (latest: data/users/15LYZz82LwdFA4tqWVgv3zJ8ZsWam784VV/content.json)
[2019-04-03 07:19:54,569] DEBUG Site:1uPLoa..dmQc Loaded json: 200 (latest: data/users/1CwbqLCD6TdkinNNNb4GneZxbsoJ6Mw6oE/content.json)
[2019-04-03 07:19:56,393] DEBUG Site:1uPLoa..dmQc Loaded json: 300 (latest: data/users/15LYZz82LwdFA4tqWVgv3zJ8ZsWam784VV/content.json)
[2019-04-03 07:19:57,397] DEBUG Site:1uPLoa..dmQc Loaded json: 400 (latest: data/users/1Mx5xcSVsv8mdsXtKwBPD8X1SEfzN2VR5u/content.json)
```

After a few hours, python has been killed - Out Of Memor

```
[2019-04-03 14:21:58,321] DEBUG Site:1uPLoa..dmQc Loaded json: 44922800 (latest: data/users/1DiRWRFXcVgQQ75cXnAG2pyxxjGo2VaH5/content.json)
[2019-04-03 14:21:58,346] DEBUG Site:1uPLoa..dmQc Loaded json: 44922900 (latest: data/users/1Hfhfqq1dC9cPDrLHGmX5QYFYX3BmeGi6w/content.json)
[2019-04-03 14:21:58,369] DEBUG Site:1uPLoa..dmQc Loaded json: 44923000 (latest: data/users/1FZYhmAxsjUgUsDb3maysDUc9nRjfJNQm5/content.json)
[2019-04-03 14:21:58,394] DEBUG Site:1uPLoa..dmQc Loaded json: 44923100 (latest: data/users/1QHVkerVSwMQF8LtzEb5XQSZxGeu9dRHmL/content.json)
[2019-04-03 14:21:58,416] DEBUG Site:1uPLoa..dmQc Loaded json: 44923200 (latest: data/users/1L3kWGTi9tCFGLrt9EXGN55W1oNv7CU5Hj/content.json)
[2019-04-03 14:21:58,443] DEBUG Site:1uPLoa..dmQc Loaded json: 44923300 (latest: data/users/19QH9sZCo9RB6TA7648YQsX6rda7toiBnB/content.json)
[2019-04-03 14:21:58,468] DEBUG Site:1uPLoa..dmQc Loaded json: 44923400 (latest: data/users/12qJ8Wiyw72qWbKDnzg7qDGdL1fLUBzeXQ/content.json)
```

As you can see, the application tries to load different **content.json** user files over **44922800** times. In a data directory, I have only **594** user directories.

```
# ls -la /zeronet/data/1uPLoaDwKzP6MCGoVzw48r4pxawRBdmQc/data/users/ | wc -l
594
```

#### Expected Results:

Initialization of ZeroNet should be very fast.

Why application check content.json user file many times? Should be some kind of cache to prevent load the same file several times.

At the moment I cannot get access to Web Interface of ZeroNet

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。