Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Server stuck into "Unloading level world" after a server stop #2046

Closed
3do2 opened this issue Sep 3, 2014 · 22 comments
Closed

Server stuck into "Unloading level world" after a server stop #2046

3do2 opened this issue Sep 3, 2014 · 22 comments

Comments

@3do2
Copy link

3do2 commented Sep 3, 2014

This occurs only after a long run. With many players.
After a short run, the server stop quicly.
After 30 minutes, and many players it can take 30 seconds or 1 minute.
After one day, the server never stop (cpu is low)
The only way to stop the process is to kill it (kill - 9 pid)

Before the build ~500 the server was crashing. So this bug was hidden.

stop
08:13:01 [NOTICE] [bag_auth] Server Command [stop] sent by CONSOLE
08:13:01 [INFO] CONSOLE: Stopping the server...
08:13:03 [INFO] Disabling DevTools v1.8.0
08:13:03 [INFO] Disabling Bag_inventory v1.0.0
08:13:03 [INFO] [bag_inventory] Bag_inventory disabled, config Saved
08:13:03 [INFO] Disabling Bag_auth v1.0.3
08:13:03 [INFO] [bag_auth] Main disabled
08:13:03 [INFO] Disabling Bag_map v1.0.1
08:13:03 [INFO] [bag_map] Bag_map disabled
08:13:03 [INFO] Disabling Bag_vote v1.0.1
08:13:03 [INFO] [Bag_vote] Bag_vote disabled
08:13:03 [INFO] Disabling Bag_events v1.0.7
08:13:03 [INFO] [bag_events] Scores saved to file
08:13:03 [INFO] Disabling Bag_zone v1.0.4
08:13:03 [INFO] [bag_zone] Bag_zone disabled
08:13:03 [INFO] Disabling Bag_warp v1.0.3
08:13:03 [INFO] [bag_warp] Bag_warp disabled
08:13:03 [INFO] Econo8945 has left the game
08:13:03 [INFO] Econo8945[/106.160.58.11:58089] logged out due to Server closed
08:13:03 [INFO] Unloading level "world"

@3do2 3do2 changed the title Server stuck into "Unloading level world" after a server stop Server stuck into "Unloading level world" after a server stop (build 519) Sep 3, 2014
@tnpxxsheepdog
Copy link
Contributor

I suggest using an auto restart plugin that can regularly stop and restart the server. This doesnt always help but can still fix a lot of issues.

@ghost
Copy link

ghost commented Sep 3, 2014

same problem when the server is swarmed with many players.

@tnpxxsheepdog
Copy link
Contributor

This is happening every time now. It used to happen only a few times. Now every time I do /stop, it happens.

@tnpxxsheepdog
Copy link
Contributor

A note: CTRL+C does not stop the proccess, it is frozen completely

@3do2
Copy link
Author

3do2 commented Sep 11, 2014

yes only kill -9 pid as i wrote it. I confirm i still have the issue. Only if the server runs hours with players.

@tnpxxsheepdog
Copy link
Contributor

I use htop :)

@tnpxxsheepdog
Copy link
Contributor

On build 576, the server cannot unload the world even after 10 minutes of being on. I tried to use a short stroke restart method (restarting the server every 10 minutes) and that worked only a few times. Still trying to test a few things out. Will report further incidents here.

@shoghicp shoghicp changed the title Server stuck into "Unloading level world" after a server stop (build 519) Server stuck into "Unloading level world" after a server stop Sep 18, 2014
@tnpxxsheepdog
Copy link
Contributor

Will test this soon. @shoghicp the reason this is so vital is networks like ours like ti Auto restart the nodes. Thanks for the commit!

@tnpxxsheepdog
Copy link
Contributor

@shoghicp Unfortunately, server is still caught on Unloading world. CTRL+C does not kill the proccess, which confirms that it is truly frozen.

@shoghicp
Copy link
Member

@tnpxxsheepdog Once it starts to unload things, Ctrl+C won't be handled anymore (it depends on ticks). It doesn't mean that it has stopped completely, only that it can't stop two times in a row ;)

@tnpxxsheepdog
Copy link
Contributor

I waited for about a minute. So I need to wait a bit longer?

@shoghicp
Copy link
Member

Could you test again using the new build?

@tnpxxsheepdog
Copy link
Contributor

Yes, give me a few hours. Will report results. Thanks!

@tnpxxsheepdog
Copy link
Contributor

Just installed build 585, will test level unloading in a few hours after the server has been full for a while.

@tnpxxsheepdog
Copy link
Contributor

@shoghicp In my first test, the world unloaded properly. That was with around 25 people online. Let me test is a few more times. Seems to be working at the moment! Thanks!

@tnpxxsheepdog
Copy link
Contributor

Attempt number 2 at 21 players online was a success. World IS unloading and the server is stopping as it should!

@shoghicp
Copy link
Member

I'll mark this as fixed for now. If it shows up again, please open a new issue and place this as a related issue

@3do2
Copy link
Author

3do2 commented Sep 20, 2014

After 1 day, i do a stop. The server stops sucessfully :)
but i had this message =>

07:42:50 [INFO] Unloading level "world"
07:42:55 [INFO] Stopping other threads
zend_mm_heap corrupted

@tnpxxsheepdog
Copy link
Contributor

Increase "output_buffering" in php.ini

@3do2
Copy link
Author

3do2 commented Sep 21, 2014

thx @tnpxxsheepdog i'll have a look to this parameter.
Another report on this subject =>

After a crash crash caused by memory issue, the server stuck on "unloading world"

20:46:31 [INFO] LMNTRIX[/63.135.255.45:34137] logged in with entity id 8349 at (world, -714.7, 69, -896.7)

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 16385 bytes) in phar:///home/minecraft/pocketmine/PocketMine-MP.phar/src/pocketmine/nbt/NBT.php on line 78
20:46:31 [EMERGENCY] An unrecoverable error has occurred and the server has crashed. Creating a crash dump
20:46:31 [EMERGENCY] Please submit the "/home/minecraft/pocketmine/CrashDump_Sat_Sep_20-20.46.31-UTC_2014.log" file to the Bug Reporting page. Give as much info as you can.
20:46:31 [NOTICE] An E_NOTICE error happened: "Undefined index: type" in "/src/pocketmine/Server" at line 1927
20:46:31 [NOTICE] An E_NOTICE error happened: "Undefined index: type" in "/src/pocketmine/Server" at line 1927
20:46:31 [EMERGENCY] The crash dump has been automatically submitted to the Crash Archive. You can view it on http://crash.pocketmine.net/view/42653 or use the ID #42653.
20:46:32 [INFO] Disabling DevTools v1.8.0
20:46:32 [INFO] Disabling Bag_inventory v1.0.0
20:46:32 [INFO] [bag_inventory] Bag_inventory disabled, config Saved
20:46:32 [INFO] Disabling Bag_vote v1.0.1
20:46:32 [INFO] [Bag_vote] Bag_vote disabled
20:46:32 [INFO] Disabling Bag_auth v1.0.5
20:46:32 [INFO] [bag_auth] Main disabled
20:46:32 [INFO] Disabling Bag_map v1.0.1
20:46:32 [INFO] [bag_map] Bag_map disabled
20:46:32 [INFO] Disabling Bag_events v1.0.10
20:46:32 [INFO] [bag_events] Scores saved to file
20:46:32 [INFO] Disabling Bag_warp v1.0.5
20:46:32 [INFO] [bag_warp] Bag_warp disabled
20:46:32 [INFO] Disabling Bag_zone v1.0.7
20:46:32 [INFO] [bag_zone] Bag_zone disabled
20:46:32 [INFO] CKPrankz has left the game
20:46:32 [INFO] CKPrankz[/74.141.60.231:56102] logged out due to Server closed
20:46:32 [INFO] superswag1 has left the game
20:46:32 [INFO] superswag1[/72.201.128.59:54641] logged out due to Server closed
20:46:32 [INFO] ElChelero has left the game
20:46:32 [INFO] ElChelero[/177.229.127.144:60767] logged out due to Server closed
20:46:32 [INFO] FrogMC has left the game
20:46:32 [INFO] FrogMC[/86.46.158.3:59200] logged out due to Server closed
20:46:32 [INFO] joeycup has left the game
20:46:32 [INFO] joeycup[/71.77.215.242:56968] logged out due to Server closed
20:46:33 [INFO] ENDCRAFT202 has left the game
20:46:33 [INFO] ENDCRAFT202[/100.0.4.238:49721] logged out due to Server closed
20:46:33 [INFO] richie has left the game
20:46:33 [INFO] richie[/174.98.119.155:52978] logged out due to Server closed
20:46:33 [INFO] ProGirl1326 has left the game
20:46:33 [INFO] ProGirl1326[/87.170.162.229:64107] logged out due to Server closed
20:46:33 [INFO] 1pzoo has left the game
20:46:33 [INFO] 1pzoo[/98.179.195.218:39482] logged out due to Server closed
20:46:33 [INFO] THEBESTMINER55 has left the game
20:46:33 [INFO] THEBESTMINER55[/199.193.85.74:60217] logged out due to Server closed
20:46:33 [INFO] THEMINAKID17 has left the game
20:46:33 [INFO] THEMINAKID17[/82.14.158.160:50654] logged out due to Server closed
20:46:33 [INFO] LMNTRIX[/63.135.255.45:34137] logged out due to Server closed
20:46:33 [INFO] Unloading level "world"

@3do2
Copy link
Author

3do2 commented Sep 25, 2014

@tnpxxsheepdog I have no "output_buffering" entry into /pocketmine/bin/php5/bin/php.ini ?

@shoghicp Server stuck into "Unloading level world" after a server crash cause by memory issue

yesterday my server was stuck after a manual stop... I think there is still a problem when the server run a long time with a lot of players playing on a large map. I feel it's a memory consumtion problem.

@tnpxxsheepdog
Copy link
Contributor

The best thing to do is restart it manually every three hours or so. It will not get stuck if you do small intervals.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants