thijsvanloef / palworld-server-docker

A Docker Container to easily run a Palworld dedicated server.
https://hub.docker.com/r/thijsvanloef/palworld-server-docker
MIT License
2.42k stars 295 forks source link

The server crash after some minutes of gaming session #84

Closed TombSte closed 7 months ago

TombSte commented 7 months ago

Describe the bug

After some minutes of gaming (sometimes 5 minutes, sometimes 1 hour) the game lags for all players (we are 1-4 people at the same time).

To Reproduce

Play for some minutes

Expected behavior

A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

docker-compose.yml contents

services:
   palworld:
      image: thijsvanloef/palworld-server-docker:latest
      restart: unless-stopped
      container_name: palworld-server
      ports:
        - 8211:8211/udp
        - 27015:27015/udp
      environment:
         - PUID=25000
         - PGID=25000
         - PORT=8211 # Optional but recommended
         - PLAYERS=16 # Optional but recommended
         - MULTITHREADING=false
         - COMMUNITY=false  # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD!
         # Enable the environment variables below if you have COMMUNITY=true
         #- SERVER_PASSWORD="Samugay"
         - SERVER_NAME="Samuele"
         - ADMIN_PASSWORD="pcmasterping"
         - MULTITHREADING=true
      mem_reservation: "5000M"
      volumes:
         - ./palworld:/palworld/

Container/Host Logs

LogPakFile: Display: Found Pak file ../../../Engine/Programs/CrashReportClient/Content/Paks/CrashReportClient.pak attempting to mount. 2024-01-24 09:56:25 LogPakFile: Display: Mounting pak file ../../../Engine/Programs/CrashReportClient/Content/Paks/CrashReportClient.pak. 2024-01-24 09:56:25 LogPakFile: Display: Mounted Pak file '../../../Engine/Programs/CrashReportClient/Content/Paks/CrashReportClient.pak', mount point: '../../../Engine/' 2024-01-24 09:56:25 LogICUInternationalization: ICU TimeZone Detection - Raw Offset: +0:00, Platform Override: '' 2024-01-24 09:56:25 LogInit: Build: ++UE5+Release-5.1-CL-0 2024-01-24 09:56:25 LogInit: Engine Version: 5.1.1-0+++UE5+Release-5.1 2024-01-24 09:56:25 LogInit: Compatible Engine Version: 5.1.0-0+++UE5+Release-5.1 2024-01-24 09:56:25 LogInit: Net CL: 0 2024-01-24 09:56:25 LogInit: OS: Debian GNU/Linux 11 (bullseye) (5.15.133.1-microsoft-standard-WSL2), CPU: AMD Ryzen 5 4500U with Radeon Graphics, GPU: UnknownVendor 2024-01-24 09:56:25 LogInit: Compiled (64-bit): Dec 31 2023 20:12:22 2024-01-24 09:56:25 LogInit: Compiled with Clang: 13.0.1 (https://github.com/llvm/llvm-project 75e33f71c2dae584b13a7d1186ae0a038ba98838) 2024-01-24 09:56:25 LogInit: Build Configuration: Shipping 2024-01-24 09:56:25 LogInit: Branch Name: ++UE5+Release-5.1 2024-01-24 09:56:25 LogInit: Command Line: -Abslog="/palworld/Pal/Saved/Logs/Pal-CRC.log" -Unattended -ImplicitSend "/palworld/Pal/Saved/Crashes/crashinfo-Pal-pid-64-123E13D2A56B4A3DA1334968B21AF7A0/" -unattended 2024-01-24 09:56:25 LogInit: Base Directory: /palworld/Engine/Binaries/Linux/ 2024-01-24 09:56:25 LogInit: Allocator: Mimalloc 2024-01-24 09:56:25 LogInit: Installed Engine Build: 1 2024-01-24 09:56:25 LogInit: Presizing for max 100000 objects, including 0 objects not considered by GC, pre-allocating 0 bytes for permanent pool. 2024-01-24 09:56:25 LogInit: Object subsystem initialized 2024-01-24 09:56:25 [2024.01.24-08.56.25:384][ 0]LogConfig: Applying CVar settings from Section [ConsoleVariables] File [Engine] 2024-01-24 09:56:25 [2024.01.24-08.56.25:386][ 0]LogInit: Unix hardware info: 2024-01-24 09:56:25 [2024.01.24-08.56.25:386][ 0]LogInit: - we are the first instance of this executable 2024-01-24 09:56:25 [2024.01.24-08.56.25:390][ 0]LogInit: - this process' id (pid) is 355, parent process' id (ppid) is 64 2024-01-24 09:56:25 [2024.01.24-08.56.25:390][ 0]LogInit: - we are not running under debugger 2024-01-24 09:56:25 [2024.01.24-08.56.25:391][ 0]LogInit: - machine network name is '974127c60607' 2024-01-24 09:56:25 [2024.01.24-08.56.25:416][ 0]LogInit: - user name is 'steam' (steam) 2024-01-24 09:56:25 [2024.01.24-08.56.25:417][ 0]LogInit: - we're logged in locally 2024-01-24 09:56:25 [2024.01.24-08.56.25:417][ 0]LogInit: - we're running with rendering 2024-01-24 09:56:25 [2024.01.24-08.56.25:417][ 0]LogInit: - CPU: AuthenticAMD 'AMD Ryzen 5 4500U with Radeon Graphics' (signature: 0x860F01) 2024-01-24 09:56:25 [2024.01.24-08.56.25:417][ 0]LogInit: - Number of physical cores available for the process: 4 2024-01-24 09:56:25 [2024.01.24-08.56.25:417][ 0]LogInit: - Number of logical cores available for the process: 4 2024-01-24 09:56:25 [2024.01.24-08.56.25:417][ 0]LogInit: - Cache line size: 64 2024-01-24 09:56:25 [2024.01.24-08.56.25:417][ 0]LogInit: - GPU Brand Info: UnknownVendor 2024-01-24 09:56:25 [2024.01.24-08.56.25:417][ 0]LogInit: - Memory allocator used: Mimalloc 2024-01-24 09:56:25 [2024.01.24-08.56.25:417][ 0]LogInit: - This binary is optimized with LTO: no, PGO: no, instrumented for PGO data collection: no 2024-01-24 09:56:25 [2024.01.24-08.56.25:417][ 0]LogInit: - This is an internal build. 2024-01-24 09:56:25 [2024.01.24-08.56.25:418][ 0]LogCore: Skipped benchmarking clocks because the engine is running in a standalone program mode - CLOCK_MONOTONIC will be used. 2024-01-24 09:56:25 [2024.01.24-08.56.25:418][ 0]LogInit: Unix-specific commandline switches: 2024-01-24 09:56:25 [2024.01.24-08.56.25:418][ 0]LogInit: -ansimalloc - use malloc()/free() from libc (useful for tools like valgrind and electric fence) 2024-01-24 09:56:25 [2024.01.24-08.56.25:419][ 0]LogInit: -jemalloc - use jemalloc for all memory allocation 2024-01-24 09:56:25 [2024.01.24-08.56.25:419][ 0]LogInit: -binnedmalloc - use binned malloc for all memory allocation 2024-01-24 09:56:25 [2024.01.24-08.56.25:419][ 0]LogInit: -filemapcachesize=NUMBER - set the size for case-sensitive file mapping cache 2024-01-24 09:56:25 [2024.01.24-08.56.25:419][ 0]LogInit: -useksm - uses kernel same-page mapping (KSM) for mapped memory (OFF) 2024-01-24 09:56:25 [2024.01.24-08.56.25:419][ 0]LogInit: -ksmmergeall - marks all mmap'd memory pages suitable for KSM (OFF) 2024-01-24 09:56:25 [2024.01.24-08.56.25:419][ 0]LogInit: -preloadmodulesymbols - Loads the main module symbols file into memory (OFF) 2024-01-24 09:56:27 [2024.01.24-08.56.25:419][ 0]LogInit: -sigdfl=SIGNAL - Allows a specific signal to be set to its default handler rather then ignoring the signal 2024-01-24 09:56:27 [2024.01.24-08.56.25:419][ 0]LogInit: -crashhandlerstacksize - Allows setting crash handler stack sizes (204800) 2024-01-24 09:56:27 [2024.01.24-08.56.25:419][ 0]LogInit: -noexclusivelockonwrite - disables marking files created by the engine as exclusive locked while the engine has them opened 2024-01-24 09:56:27 [2024.01.24-08.56.25:419][ 0]LogInit: -httpproxy=ADDRESS:PORT - redirects HTTP requests to a proxy (only supported if compiled with libcurl) 2024-01-24 09:56:27 [2024.01.24-08.56.25:419][ 0]LogInit: -reuseconn - allow libcurl to reuse HTTP connections (only matters if compiled with libcurl) 2024-01-24 09:56:27 [2024.01.24-08.56.25:419][ 0]LogInit: -virtmemkb=NUMBER - sets process virtual memory (address space) limit (overrides VirtualMemoryLimitInKB value from .ini) 2024-01-24 09:56:27 [2024.01.24-08.56.25:421][ 0]LogInit: - Physical RAM available (not considering process quota): 6 GB (5930 MB, 6073144 KB, 6218899456 bytes) 2024-01-24 09:56:27 [2024.01.24-08.56.25:421][ 0]LogInit: - VirtualMemoryAllocator pools will grow at scale 1.4 2024-01-24 09:56:27 [2024.01.24-08.56.25:421][ 0]LogInit: - MemoryRangeDecommit() will be a no-op (re-run with -vmapoolevict to change) 2024-01-24 09:56:27 [2024.01.24-08.56.25:421][ 0]LogInit: - PageSize 4096 2024-01-24 09:56:27 [2024.01.24-08.56.25:421][ 0]LogInit: - BinnedPageSize 65536 2024-01-24 09:56:27 [2024.01.24-08.56.25:625][ 0]LogUObjectArray: 419 objects as part of root set at end of initial load. 2024-01-24 09:56:27 [2024.01.24-08.56.25:625][ 0]LogUObjectAllocator: 89064 out of 0 bytes used by permanent object pool. 2024-01-24 09:56:27 [2024.01.24-08.56.25:625][ 0]LogUObjectArray: CloseDisregardForGC: 0/0 objects in disregard for GC pool 2024-01-24 09:56:27 [2024.01.24-08.56.25:661][ 0]LogPaths: Warning: No paths for game localization data were specifed in the game configuration. 2024-01-24 09:56:27 [2024.01.24-08.56.25:663][ 0]LogInit: Using OS detected language (en-US-POSIX). 2024-01-24 09:56:27 [2024.01.24-08.56.25:663][ 0]LogInit: Using OS detected locale (en-US-POSIX). 2024-01-24 09:56:27 [2024.01.24-08.56.25:663][ 0]LogInit: Warning: No paths for engine localization data were specifed in the engine configuration. 2024-01-24 09:56:27 [2024.01.24-08.56.25:670][ 0]LogTextLocalizationManager: No localization for 'en-US-POSIX' exists, so 'en' will be used for the language. 2024-01-24 09:56:27 [2024.01.24-08.56.25:670][ 0]LogTextLocalizationManager: No localization for 'en-US-POSIX' exists, so 'en' will be used for the locale. 2024-01-24 09:56:27 [2024.01.24-08.56.25:700][ 0]LogInit: Using OS detected language (en-US-POSIX). 2024-01-24 09:56:27 [2024.01.24-08.56.25:700][ 0]LogInit: Using OS detected locale (en-US-POSIX). 2024-01-24 09:56:27 [2024.01.24-08.56.25:700][ 0]LogTextLocalizationManager: No localization for 'en-US-POSIX' exists, so 'en' will be used for the language. 2024-01-24 09:56:27 [2024.01.24-08.56.25:700][ 0]LogTextLocalizationManager: No localization for 'en-US-POSIX' exists, so 'en' will be used for the locale. 2024-01-24 09:56:27 [2024.01.24-08.56.25:753][ 0]LogPackageLocalizationCache: Processed 2 localized package path(s) for 1 prioritized culture(s) in 0.017788 seconds 2024-01-24 09:56:27 [2024.01.24-08.56.25:763][ 0]CrashReportCoreLog: CrashReportClientVersion=1.0 2024-01-24 09:56:27 [2024.01.24-08.56.25:763][ 0]CrashReportCoreLog: CrashReportReceiver disabled 2024-01-24 09:56:27 [2024.01.24-08.56.25:763][ 0]CrashReportCoreLog: DataRouterUrl: https://o1291919.ingest.sentry.io/api/6513339/unreal/4a1a3921f51f4975b4cf8dd19022cb20/ 2024-01-24 09:56:27 [2024.01.24-08.56.25:822][ 0]CrashReportCoreLog: Initial state = Unknown UploadState value 2024-01-24 09:56:27 [2024.01.24-08.56.25:822][ 0]CrashReportCoreLog: Initial state = Unknown UploadState value 2024-01-24 09:56:27 [2024.01.24-08.56.25:843][ 0]LogCrashDebugHelper: DepotName: //UE5/Release-5.1 2024-01-24 09:56:27 [2024.01.24-08.56.25:843][ 0]LogCrashDebugHelper: BuiltFromCL: 0 2024-01-24 09:56:27 [2024.01.24-08.56.25:844][ 0]LogCrashDebugHelper: EngineVersion: 5.1.1-0+++UE5+Release-5.1 2024-01-24 09:56:27 [2024.01.24-08.56.25:846][ 0]LogCrashDebugHelper: BuildVersion: ++UE5+Release-5.1-CL-0 2024-01-24 09:56:27 [2024.01.24-08.56.27:054][ 0]CrashReportCoreLog: Got 3 pending files to upload from 'crashinfo-Pal-pid-64-123E13D2A56B4A3DA1334968B21AF7A0' 2024-01-24 09:56:27 [2024.01.24-08.56.27:063][ 0]CrashReportCoreLog: State change from Ready to SendingFiles 2024-01-24 09:56:27 [2024.01.24-08.56.27:063][ 0]CrashReportCoreLog: CompressAndSendData have 3 pending files 2024-01-24 09:56:29 [2024.01.24-08.56.27:063][ 0]CrashReportCoreLog: CompressAndSendData compressing 5803 bytes ('/palworld/Pal/Saved/Crashes/crashinfo-Pal-pid-64-123E13D2A56B4A3DA1334968B21AF7A0/CrashContext.runtime-xml') 2024-01-24 09:56:29 [2024.01.24-08.56.27:067][ 0]CrashReportCoreLog: CompressAndSendData compressing 152 bytes ('/palworld/Pal/Saved/Crashes/crashinfo-Pal-pid-64-123E13D2A56B4A3DA1334968B21AF7A0/CrashReportClient.ini') 2024-01-24 09:56:29 [2024.01.24-08.56.27:071][ 0]CrashReportCoreLog: CompressAndSendData compressing 349 bytes ('/palworld/Pal/Saved/Crashes/crashinfo-Pal-pid-64-123E13D2A56B4A3DA1334968B21AF7A0/Diagnostics.txt') 2024-01-24 09:56:29 [2024.01.24-08.56.27:590][ 0]LogInit: Using libcurl 7.83.1 2024-01-24 09:56:29 [2024.01.24-08.56.27:593][ 0]LogInit: - built for Linux 2024-01-24 09:56:29 [2024.01.24-08.56.27:593][ 0]LogInit: - supports SSL with OpenSSL/1.1.1n 2024-01-24 09:56:29 [2024.01.24-08.56.27:593][ 0]LogInit: - supports HTTP deflate (compression) using libz 1.2.12 2024-01-24 09:56:29 [2024.01.24-08.56.27:593][ 0]LogInit: - other features: 2024-01-24 09:56:29 [2024.01.24-08.56.27:593][ 0]LogInit: CURL_VERSION_SSL 2024-01-24 09:56:29 [2024.01.24-08.56.27:593][ 0]LogInit: CURL_VERSION_LIBZ 2024-01-24 09:56:29 [2024.01.24-08.56.27:593][ 0]LogInit: CURL_VERSION_IPV6 2024-01-24 09:56:29 [2024.01.24-08.56.27:593][ 0]LogInit: CURL_VERSION_ASYNCHDNS 2024-01-24 09:56:29 [2024.01.24-08.56.27:593][ 0]LogInit: CURL_VERSION_LARGEFILE 2024-01-24 09:56:29 [2024.01.24-08.56.27:673][ 0]LogInit: CurlRequestOptions (configurable via config and command line): 2024-01-24 09:56:29 [2024.01.24-08.56.27:677][ 0]LogInit: - bVerifyPeer = false - Libcurl will NOT verify peer certificate 2024-01-24 09:56:29 [2024.01.24-08.56.27:677][ 0]LogInit: - bUseHttpProxy = false - Libcurl will NOT use HTTP proxy 2024-01-24 09:56:29 [2024.01.24-08.56.27:677][ 0]LogInit: - bDontReuseConnections = false - Libcurl will reuse connections 2024-01-24 09:56:29 [2024.01.24-08.56.27:677][ 0]LogInit: - MaxHostConnections = 16 - Libcurl will limit the number of connections to a host 2024-01-24 09:56:29 [2024.01.24-08.56.27:677][ 0]LogInit: - LocalHostAddr = Default 2024-01-24 09:56:29 [2024.01.24-08.56.27:677][ 0]LogInit: - BufferSize = 65536 2024-01-24 09:56:29 [2024.01.24-08.56.27:845][ 0]CrashReportCoreLog: Sending HTTP request: https://o1291919.ingest.sentry.io/api/6513339/unreal/4a1a3921f51f4975b4cf8dd19022cb20/?AppID=CrashReporter&AppVersion=5.1.1-0%2B%2B%2BUE5%2BRelease-5.1&AppEnvironment=Release&UploadType=crashreports&UserID=-000061a8%7C%7C 2024-01-24 09:56:29 [2024.01.24-08.56.28:553][ 0]CrashReportCoreLog: OnProcessRequestComplete(), State=SendingFiles bSucceeded=1 2024-01-24 09:56:29 [2024.01.24-08.56.28:553][ 0]CrashReportCoreLog: State change from SendingFiles to SendingFiles 2024-01-24 09:56:29 [2024.01.24-08.56.28:553][ 0]CrashReportCoreLog: All uploads done 2024-01-24 09:56:29 [2024.01.24-08.56.28:553][ 0]CrashReportCoreLog: State change from SendingFiles to Finished 2024-01-24 09:56:29 [2024.01.24-08.56.29:043][ 0]CrashReportCoreLog: Final state (Receiver) = Finished 2024-01-24 09:56:29 [2024.01.24-08.56.29:050][ 0]CrashReportCoreLog: Final state (Receiver) = Unknown UploadState value 2024-01-24 09:56:29 [2024.01.24-08.56.29:056][ 0]LogCore: Engine exit requested (reason: CrashReportClientApp RequestExit) 2024-01-24 09:56:29 [2024.01.24-08.56.29:058][ 0]LogExit: Preparing to exit. 2024-01-24 09:56:29 [2024.01.24-08.56.29:170][ 0]LogExit: Object subsystem successfully closed. 2024-01-24 09:56:29 [2024.01.24-08.56.29:212][ 0]LogModuleManager: Shutting down and abandoning module HTTP (12) 2024-01-24 09:56:29 [2024.01.24-08.56.29:299][ 0]LogModuleManager: Shutting down and abandoning module SSL (11) 2024-01-24 09:56:29 [2024.01.24-08.56.29:305][ 0]LogModuleManager: Shutting down and abandoning module CrashDebugHelper (8) 2024-01-24 09:56:29 [2024.01.24-08.56.29:305][ 0]LogModuleManager: Shutting down and abandoning module CoreUObject (6) 2024-01-24 09:56:29 [2024.01.24-08.56.29:305][ 0]LogModuleManager: Shutting down and abandoning module PakFile (4) 2024-01-24 09:56:29 [2024.01.24-08.56.29:312][ 0]LogModuleManager: Shutting down and abandoning module RSA (3) 2024-01-24 09:56:29 [2024.01.24-08.56.29:327][ 0]LogExit: Exiting. 2024-01-24 09:56:29 dlmopen steamservice.so failed: steamservice.so: cannot open shared object file: No such file or directory 2024-01-24 09:56:29 Engine crash handling finished; re-raising signal 0 for the default handler. Good bye.

Additional context

I configured properly the router and firewall.

thijsvanloef commented 7 months ago

I think this might be a memory leak of the Palworld Dedicated server, especially because there is only 6GB of ram available for the server:

2024-01-24 09:56:27 [2024.01.24-08.56.25:421][ 0]LogInit: - Physical RAM available (not considering process quota): 6 GB (5930 MB, 6073144 KB, 6218899456 bytes)

softshelled commented 7 months ago

I also met the same problem Shutdown handler: initalize.

MSpreckels commented 7 months ago

I have also seen the same situation going on when using not enough ram / too little ram. I've read on xgamingserver that 16 gigs of RAM are recommended but it'll work with less.

I'm operating my server with 20 gigs and am restarting it every day due to lag build up. I suspect that there is, as @thijsvanloef said, a memory leak.

TombSte commented 7 months ago

I think this might be a memory leak of the Palworld Dedicated server, especially because there is only 6GB of ram available for the server:

2024-01-24 09:56:27 [2024.01.24-08.56.25:421][ 0]LogInit: - Physical RAM available (not considering process quota): 6 GB (5930 MB, 6073144 KB, 6218899456 bytes)

So we have to wait a fix of palword developers, right?

thijsvanloef commented 7 months ago

@TombSte Sadly yes