iTXTech / Genisys

Feature-rich server software for Minecraft: Pocket Edition & Windows 10 Edition Beta
https://itxtech.org/genisys/
GNU General Public License v3.0
433 stars 243 forks source link

Memory issue #194

Closed Pub4Game closed 8 years ago

Pub4Game commented 8 years ago
Genisys

 Crash Dump Sat Jan 30 12:35:10 MSK 2016

Error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 1187840 bytes)
File: /src/pocketmine/Server
Line: 2198
Type: E_ERROR

Code:
[2189]          }
[2190]      }
[2191] 
[2192]      //$this->broadcastPacketsCallback(zlib_encode($str, ZLIB_ENCODING_DEFLATE, $this->networkCompressionLevel), $targets);//临时修复
[2193] 
[2194]      if(!$forceSync and $this->networkCompressionAsync){
[2195]          $task = new CompressBatchedTask($str, $targets, $this->networkCompressionLevel);
[2196]          $this->getScheduler()->scheduleAsyncTask($task);
[2197]      }else{
[2198]          $this->broadcastPacketsCallback(zlib_encode($str, ZLIB_ENCODING_DEFLATE, $this->networkCompressionLevel), $targets);
[2199]      }
[2200] 
[2201]      Timings::$playerNetworkTimer->stopTiming();
[2202]  }
[2203] 
[2204]  public function broadcastPacketsCallback($data, array $identifiers){
[2205]      $pk = new BatchPacket();
[2206]      $pk->payload = $data;
[2207]      $pk->encode();
[2208]      $pk->isEncoded = true;

Backtrace:
#0 (): pocketmine\Server->crashDump(boolean)

Genisys version: 1.0dev #0 [Protocol 38; API 2.0.0]
uname -a: Linux c1.24serv.pro 3.10.0-327.3.1.el7.x86_64 #1 SMP Wed Dec 9 14:09:15 UTC 2015 x86_64
PHP version: 7.0.2
Zend version: 3.0.0
OS : Linux, linux
Error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 4096 bytes)
File: /src/pocketmine/utils/Config
Line: 143
Type: E_ERROR

Code:
[134]                   case Config::PROPERTIES:
[135]                   case Config::CNF:
[136]                       $this->parseProperties($content);
[137]                       break;
[138]                   case Config::JSON:
[139]                       $this->config = json_decode($content, true);
[140]                       break;
[141]                   case Config::YAML:
[142]                       $content = self::fixYAMLIndexes($content);
[143]                       $this->config = yaml_parse($content);
[144]                       break;
[145]                   case Config::SERIALIZED:
[146]                       $this->config = unserialize($content);
[147]                       break;
[148]                   case Config::ENUM:
[149]                       $this->parseList($content);
[150]                       break;
[151]                   default:
[152]                       $this->correct = false;
[153] 

Backtrace:
#0 (): pocketmine\Server->crashDump(boolean)

Genisys version: 1.0dev #0 [Protocol 38; API 2.0.0]
uname -a: Linux c1.24serv.pro 3.10.0-327.3.1.el7.x86_64 #1 SMP Wed Dec 9 14:09:15 UTC 2015 x86_64
PHP version: 7.0.2
Zend version: 3.0.0
OS : Linux, linux
Jelly9912 commented 8 years ago

Same for me, and sometimes "undefined offset '8'"

PeratX commented 8 years ago

Try to turn off server.async-chunk-request in genisys.yml

Pub4Game commented 8 years ago

i add two crash

PeratX commented 8 years ago

@pub4game ?

Pub4Game commented 8 years ago

@PeratX crash with config

image

PeratX commented 8 years ago

And I found the latest pthreads does not collect objects !!!

Pub4Game commented 8 years ago

Ohhh....

PeratX commented 8 years ago

Out of memory crashes are all releated to pthreads does not collect objects to release memory.

Jelly9912 commented 8 years ago

So what i should do to fix this?

Pub4Game commented 8 years ago

@PeratX You will be able to fix it?

xpyctum commented 8 years ago

@Pub4Game I don't know but try clear server.log Мб поможет, не проверял.

Pub4Game commented 8 years ago

@xpyctum я тестирую на хостинге, там каждый перезапуск - новый server.log

xpyctum commented 8 years ago

@Pub4Game А, ок, не знал политику 24серв.

Jelly9912 commented 8 years ago

screenshot_2016-01-30-11-14-14

Pub4Game commented 8 years ago

@PeratX "Try to turn off server.async-chunk-request in genisys.yml" It didn't help

PeratX commented 8 years ago

😔No solution avaliable now. @ZhyMc has written an issue about it in pthreads repo.

Pub4Game commented 8 years ago

@PeratX What do I do? I want to use the Genisys php7

PepbookPvP commented 8 years ago

pub,peratx is sleeping,.,.,,,,

Pub4Game commented 8 years ago

@Efforto I understand)) But he will answer me later.

wyattzheng commented 8 years ago

@Pub4Game post a issue on pThreads project,i think they will give us a response soon

Pub4Game commented 8 years ago

@ZhyMC Now there is no way to use php7? php5 THIS is terrible... it is buggy

PepbookPvP commented 8 years ago

it's time to bed in ur country23333

PepbookPvP commented 8 years ago

php5 is better, i used...= =

Pub4Game commented 8 years ago

@ZhyMC image

;/

wyattzheng commented 8 years ago

@Pub4Game i think an example will not make the problem solved,if he know why the problem happens,he would not ask me for an example.So i at the author for a response

wyattzheng commented 8 years ago

@Pub4Game i have a way to mitigate the memory increasing,i will post a commit in 10hours

PepbookPvP commented 8 years ago

err...zhy! Genisys有时候会爆Load 你有过这情况没

wyattzheng commented 8 years ago

爆load是什么鬼,突然跳到满么

PepbookPvP commented 8 years ago

PepbookPvP commented 8 years ago

有时候Memory直接占满23333

wyattzheng commented 8 years ago

我优化的版本不会出现,主要是进服的时候会跳load. genisys需要线程改进,以阻止这个问题发生,但是现在pthreads又有问题

wyattzheng commented 8 years ago

但是我优化版本还是存在内存爆满问题,等待pthreads解决

wyattzheng commented 8 years ago

....

PepbookPvP commented 8 years ago

:sob: 为了防止爆内存我直接调了3G给他

wyattzheng commented 8 years ago

23333,土豪是靠钱解决问题的

Pub4Game commented 8 years ago

666

Pub4Game commented 8 years ago

@ZhyMC image

This is Chinese time?

PepbookPvP commented 8 years ago

wtf独服16G运存,上面开了大概10个服每个服占1G除了我占了3G

PepbookPvP commented 8 years ago

yes,pub:D

wyattzheng commented 8 years ago

@Pub4Game maybe in 1day,im busy_

PepbookPvP commented 8 years ago

now it's 3:44

PepbookPvP commented 8 years ago

qwq回去睡觉辣

wyattzheng commented 8 years ago

qwq债见

PepbookPvP commented 8 years ago

23333

Pub4Game commented 8 years ago

so many comments :D

NML32 commented 8 years ago

My memory issues have gotten worse with the latest builds.

orangetictac commented 8 years ago

В pocketmine.yml выставьте лимит памяти

karpovichv commented 8 years ago

В pocketmine.yml выставьте лимит памяти

Это не исправит обсуждаемой здесь проблемы как таковой

wyattzheng commented 8 years ago

But increasing is not a normal situation. limit can't solve it

orangetictac commented 8 years ago

У него первый крал был именно из-за утечки, а второй из-за PureChat