PocketMine-MP icon indicating copy to clipboard operation
PocketMine-MP copied to clipboard

Resource pack sending overloads low-bandwidth connections

Open DaisukeDaisuke opened this issue 5 years ago • 13 comments

(I use Google Translate.)

Issue description

(Android(Server) => Windows(Client)) (Windows => Windows) I'm sorry, but I couldn't reproduce it in the above environment.

(This problem is very similar to #2026.)

Expected result: resource pack is successfully sent to the client. Actual result: The transmission of resourcepack will stop at 1MB and after a few seconds the player will be kicked out in an timeout.(A resourcepack of 1MB or less will be sent to the client normally.)

Steps to reproduce the issue

 1. Download https://aka.ms/resourcepacktemplate and go to the resource_packs folder.
 2. Write `-Vanilla_Resource_Pack_1.12.0.zip` on resource_packs.yml to activate the resource pack.
 3. Start the server and log in to the server.
 4. When `Download World Resource Packs?` Is displayed, click `Download & Join`.
 5. The console says "Blocked 192.168.0.22 for 300 seconds", the download pack stops at 1 MB, and after a few seconds the player is kicked out with a timeout

OS and versions

PocketMine-MP: 3.9.4
PHP: php 7.2.19 (Built by php-build-scripts)
Server OS: Android
Game version: PE (Android => Android)(loopback)
Minecraft Version: 1.12.0

APP: https://play.google.com/store/apps/details?id=jackpal.androidterm

Plugins

No plugins are installed.

Crashdump, backtrace or other files

None

php Version

PHP 7.2.19 (cli) (built: Jul 15 2019 19:55:21) ( ZTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Console Output

u0_a342@SOT31:/ $ cd /sdcard/www/PocketMine4/
env TMPDIR='/storage/emulated/0/PocketMine/tmp' LESMI_RESOLV_CONF_DIR=/sdcard/PocketMine/resolv.conf /data/data/jackpal.androidterm/app_HOME/php-7.2.19 -c /sdcard/PocketMine/config/php.ini /sdcard/www/PocketMine3/PocketMine-MP.phar
[06:48:55] [Server thread/WARNING]: ChunkUtils extension is missing. Anvil-format worlds will experience degraded performance.
[06:48:55] [Server thread/INFO]: Loading pocketmine.yml...
[06:48:55] [Server thread/INFO]: Loading server properties...
[06:48:55] [Server thread/ERROR]: Missing required language file phar:///storage/emulated/0/www/PocketMine3/PocketMine-MP.phar/src/pocketmine/lang/locale/us.ini
[06:48:55] [Server thread/INFO]: Selected English (us) as the base language
[06:48:55] [Server thread/INFO]: Starting Minecraft: Bedrock Edition server version v1.12.0
[06:48:55] [Server thread/NOTICE]: Online mode is enabled. The server will verify that players are authenticated to Xbox Live.
[06:48:55] [Server thread/NOTICE]: To disable authentication, set "xbox-auth" to "false" in server.properties.
[06:48:55] [Server thread/INFO]: Opening server on 0.0.0.0:19132
[06:48:55] [Server thread/DEBUG]: Server unique id: ba2aefde-c3cb-b5f3-1aa1-57341c7e8697
[06:48:55] [Server thread/DEBUG]: Machine unique id: ba1ac2d8-3b61-0aa0-f2fc-3918c85a7f47
[06:48:55] [Server thread/INFO]: This server is running PocketMine-MP version 3.9.4
[06:48:55] [Server thread/INFO]: PocketMine-MP is distributed under the LGPL License
[06:48:56] [Server thread/INFO]: Loading resource packs...
[06:48:56] [Server thread/DEBUG]: Successfully loaded 1 resource packs
[06:48:56] [Asynchronous Worker #0 thread/DEBUG]: Set memory limit to 256 MB
[06:48:56] [Server thread/INFO]: Preparing world "world"
[06:48:56] [Server thread/INFO]: Starting GS4 status listener
[06:48:56] [Server thread/INFO]: Setting query port to 19132
[06:48:56] [Server thread/INFO]: Query running on 0.0.0.0:19132
[06:48:56] [Server thread/INFO]: Default game type: Survival Mode
[06:48:56] [Server thread/INFO]: Done (0.804s)! For help, type "help" or "?"
[06:49:01] [Server thread/DEBUG]: [AutoUpdater] Async update check failed due to "Resolving timed out after 4000 milliseconds"
[06:49:12] [RakLibServer thread/DEBUG]: Created session for 192.168.0.22 41678 with MTU size 1492
[06:49:12] [Server thread/DEBUG]: Radish12345a is logged into Xbox Live
[06:49:12] [Server thread/DEBUG]: Unhandled ClientCacheStatusPacket received from Radish12345a: gQEB
[06:49:14] [RakLibServer thread/NOTICE]: Blocked 192.168.0.22 for 300 seconds
[06:49:24] [RakLibServer thread/DEBUG]: Closed session for 192.168.0.22 41678
[06:49:24] [Server thread/INFO]: Radish12345a[/192.168.0.22:41678] logged out due to timeout

Other images

Screenshot_20190925-064920

Screenshot_20190925-064929 _20190925_074623

DaisukeDaisuke avatar Sep 24 '19 23:09 DaisukeDaisuke

relates to pmmp/RakLib#32

dktapps avatar Sep 25 '19 09:09 dktapps

In this version, the main part of my players can't download resources with 5.4 mb's, some players see progress bar with 2.01 mb's status and progress stopped, but some players are immediately disconnected.

ProCompTEAM avatar Dec 08 '19 17:12 ProCompTEAM

The basic problem here is that resource pack sending is happening without any restrictions, and the client is requesting too many resource pack chunks at the same time.

Prior to 1.13 this issue would appear when multiple large resource packs were loaded; now, it appears with any single large resource pack because the client requests all downloads at the same time instead of one-by-one like it used to.

Fixing this problem is non-trivial and requires several changes to resolve.

dktapps avatar Dec 09 '19 10:12 dktapps

To improve quality of server, this issue would be a major obstacle...

fuyutsuki avatar Mar 01 '20 01:03 fuyutsuki

is this issue will be fixed on pm4? @dktapps

Lycol50 avatar Dec 15 '21 07:12 Lycol50

No, this remains a problem (hence, the issue is still open).

dktapps avatar Dec 15 '21 12:12 dktapps

Is there anyway to fix it? Or is there any alternative solution? image

none283 avatar Dec 22 '21 18:12 none283

Is there anyway to fix it? Or is there any alternative solution? image

splits the pack into multiple packs?

NTT1906 avatar Dec 31 '21 03:12 NTT1906

https://github.com/phoshp/RPSolution

Lycol50 avatar Dec 31 '21 09:12 Lycol50

Is there anyway to fix it? Or is there any alternative solution? image

splits the pack into multiple packs?

If i simply split multipack it will still download all multi pack in one time

none283 avatar Dec 31 '21 10:12 none283

https://github.com/phoshp/RPSolution

I think this will work, thank you for solution

none283 avatar Dec 31 '21 10:12 none283

image Endless loading. I have an Internet of 500 megabits per second, an Internet server of 1 gigabit per second. How to fix it?

Kepler-296e avatar Jan 19 '24 13:01 Kepler-296e

This plugin helped me solve the problem https://github.com/xLordShadow/RPSolution/tree/master

Kepler-296e avatar Jan 19 '24 18:01 Kepler-296e