HimmelKreis4865 / JavaGen

A PocketMine-MP plugin that generates vanilla terrain based on a java server
Apache License 2.0
24 stars 1 forks source link

Connection lost, java.io.IOException: broken pipe #1

Open TheLemzz opened 4 months ago

TheLemzz commented 4 months ago

When I try to generate a world, an error occurs.

the following log appears on the java server:

Can't keep up! Is the server overloaded? Running 4116ms or 82 ticks behind [00:23:21 WARN]: Exception in thread "pool-14-thread-1" java.lang.RuntimeException: java.io.IOException: broken pipe [00:23:21 WARN]: at ChunkSender-1.0-SNAPSHOT.jar//ChunkSender.request.ChunkRequestHandler.lambda$handle$0(ChunkRequestHandler.java:42) [00:23:21 WARN]: at java.base/java.lang.Thread.run(Thread.java:840) [00:23:21 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [00:23:21 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [00:23:21 WARN]: at java.base/java.lang.Thread.run(Thread.java:840) [00:23:21 WARN]: Caused by: java.io.IOException: Обрыв канала [00:23:21 WARN]: at java.base/sun.nio.ch.FileDispatcherImpl.write0(Native Method) [00:23:21 WARN]: at java.base/sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:62) [00:23:21 WARN]: at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:132) [00:23:21 WARN]: at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:97) [00:23:21 WARN]: at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:53) [00:23:21 WARN]: at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:532) [00:23:21 WARN]: at jdk.httpserver/sun.net.httpserver.Request$WriteStream.write(Request.java:393) [00:23:21 WARN]: at jdk.httpserver/sun.net.httpserver.FixedLengthOutputStream.write(FixedLengthOutputStream.java:81) [00:23:21 WARN]: at java.base/java.io.FilterOutputStream.write(FilterOutputStream.java:108) [00:23:21 WARN]: at jdk.httpserver/sun.net.httpserver.PlaceholderOutputStream.write(ExchangeImpl.java:459) [00:23:21 WARN]: at ChunkSender-1.0-SNAPSHOT.jar//ChunkSender.request.ChunkRequestHandler.lambda$handle$0(ChunkRequestHandler.java:39) [00:23:21 WARN]: ... 4 more

on the PocketMine server:

Thread: AsyncWorker#1 Error: Connection to the upstream Java Server lost! Check the status of the server File: plugins/JavaGen-main/src/JavaGen/stream/JavaRequests Line: 47 Type: RuntimeException Backtrace:

0 pmsrc/plugins/JavaGen-main/src/JavaGen/stream/JavaRequests(19): JavaGen\stream\JavaRequests::request(string[70] http://localhost:8000/chunkRequest?chunkX=16&chunkZ=16&dimension=world)

1 pmsrc/plugins/JavaGen-main/src/JavaGen/generator/BaseJavaGenerator(54): JavaGen\stream\JavaRequests::requestChunk(object JavaGen\helper\Dimension#49068, int 16, int 16, null)

2 pmsrc/src/world/generator/PopulationTask(122): JavaGen\generator\BaseJavaGenerator->generateChunk(object pocketmine\world\SimpleChunkManager#49121, int 16, int 16)

3 pmsrc/src/world/generator/PopulationTask(93): pocketmine\world\generator\PopulationTask::setOrGenerateChunk(object pocketmine\world\SimpleChunkManager#49121, object JavaGen\generator\OverworldGenerator#49126, int 16, int 16, null)

4 pmsrc/src/scheduler/AsyncTask(81): pocketmine\world\generator\PopulationTask->onRun()

5 (): pocketmine\scheduler\AsyncTask->run()

The Internet connection is stable. Linux system. Java 17. paper latest version. Java server still working after crashing

TheLemzz commented 4 months ago

The Java server still has not sent any "overload" warnings, but the "broken pipe" error still appears.

HimmelKreis4865 commented 4 months ago

hm okay seems to be a linux thing, the other issuer (see chunksender) also uses ubuntu...For me on windows, everything is percetly fine.

The overload warning shouldn't happen any more because I drastically improved the performance and memory usage. I ran 20 tps on a server with 750mb of ram available

TheLemzz commented 4 months ago

most product servers use Linux. But I can't figure out exactly how Linux is interfering with ChunkSender..

TheLemzz commented 4 months ago

the other issuer (see chunksender) also uses ubuntu

Oh yea, now I'm sure I don't have schizophrenia and my equipment is not weak =)

TheLemzz commented 4 months ago

image oh no... (its pretty rare)

HimmelKreis4865 commented 4 months ago

why does startup take 44 seconds??

HimmelKreis4865 commented 4 months ago

most product servers use Linux. But I can't figure out exactly how Linux is interfering with ChunkSender..

Yeah I know, I didn't want to express that I won't care about linux, but seems like there are some differences between these os

TheLemzz commented 4 months ago

why does startup take 44 seconds??

idk, even without plugins startup take same time

TheLemzz commented 4 months ago

without plugins startup take same time

k im lying, startup take 44 seconds because of Geyser && WorldGuard

HimmelKreis4865 commented 4 months ago

hm alright, maybe try to record some timings without a server crash....i hope 3 minutes are doable, would be interesting what takes up so much hardware - because as said I had really no problems with performance

TheLemzz commented 4 months ago

I'm afraid the server won't be able to live for 3 minutes.. his limit is a minute or 1.5

HimmelKreis4865 commented 3 months ago

are you using code to teleport to a random point, if so please share it with me.

Also, are there any server overload messages before the errors? And please check the overall performance of your server (vps or whatever) so we can be sure that this is no hardware-limited error

TheLemzz commented 3 months ago

are you using code to teleport to a random point

No I don't

Also, are there any server overload messages before the errors?

No

And please check the overall performance of your server (vps or whatever) so we can be sure that this is no hardware-limited error

I don't see any lags or drawdowns of tps on the pmmp server or on java