Server Lag Problem [Please HELP!]


I’m having a big issue with my server right now. In my server when I reach 40 players I get high pings sometimes that go up and down. I have tried many things about it yet I could not solve it. The packets that give me the most MS are ASYNC and ESPLUGIN MYSQL. I’ve been dealing with this problem since I switched to Windows Server and I couldn’t solve it for 1.5 weeks. My last resort will be switching back to Linux but since I cannot run the Webpack on we cannot send pictures to Twitter and such. I require help for this problem and ready to pay for it.

What is your server.cfg? and your server specs?

My server cfg

start mapmanager
start chat
start chat-theme-default
start spawnmanager
start sessionmanager
start fivem
start hardcap
#start ■■■■■■■
start skinchanger
start PvP
start essentialmode
start noplayerblips
start disabledispatch
start maps
start gokart
start mysql-async
start esplugin_mysql
start async
start cron
start instance
start es_extended
start esx_addons_gcphone
start gcphone

start NoNPC
start CalmAI
start pNotify
start finger
start RadarWhileDriving

#start esx_nocarjack
start esx_whitelist
start esx_scoreboard
start esx_addonaccount
start esx_society
start esx_identity
start esx_skin
start esx_billing
start esx_datastore
start esx_license
start esx_policejob
#start esx_realestateagentjob
start esx_holdup
start esx_addoninventory
start esx_sit
#start esx_vehiclelock
start esx_vehicleshop
start esx-kr-advanced-shops
start esx_kashacters
start esx-kr-vehicle-push
start es-ui
start esx_status
start esx_basicneeds
start new_banking
start esx_doorlock
start 3ddo
start 3dme
start simpleinteractions
start fivem-toggleid

start esx_menu_default
start esx_menu_list
start es_admin2
start esx_menu_dialog
start esx_inventoryhud
start esx_inventoryhud_trunk
start esx_jobs
start esx_joblisting
start esx_taxijob
start vrp_taxi
start esx_lscustom
start esx_mechanicjob
start esx_clotheshop
start esx_barbershop
start esx_tattooshop
start esx_thief
start medSystem
#start hospital
start jsfour-idcard
#start gamz-food
start esx_ambulancejob
start qalle-wheelchair
start esx_weaponshop
start pausemenu
start esx_voice
start VoiceV2
start realtime
start vSynce
#start ESX_GiveCarKeys
start RealisticVehicleEntered
start RealisticVehicleFailure
start esx_advancedgarage
start esx_legacyfuel
#start anticheese-anticheat
start PoliceVehiclesWeaponDeleter
#start anticheat
start replyandreport
start cancelchat
start RNRPZar
start RNRPSiren
start blips
start esx_drugs
start esx_drugeffects
start InteractSound
start NativeUI
start polspeak
#start esx_walkie
start PoliceBackup
start blurr_shotsfired
start crouch
start esx_carwash
start Radiant_Animations2
start RNRPdansanimlist
start esx_foodtruck
start esx_ktackle
start vehicle_menu
#start stasiek_selldrugs
#start hyperadmin
start commands
#start esx_lawyerjob
start esx_bar
start ft_libs
start bob74_ipl
#start templatebil
start mb_addons
start mythic_progbar
start Air_force
start breze-supreme-pack
start rumpo
start HangOntoAVehicle
start hat
start glasses
start JF_RagdollCmd
start WeazelNewsCam-1.3-Dr.-Boom
#start Spotlight-master
start clothesmerfik
start wk_wrs
start esx_marker
#start yatkomut
start esx_gym
start esx_teleports
start baphs
start esx_barbie_lyftupp
start Invokelogs
start RNRPBot
start speedometer
start WeazelNewsCam-1.3-Dr.-Boom
start ambulance
start ambulanceheli
start hellsmekanik
start heli
start allcity_medical
start fivem-ipl
start phxlsmc
start pillbox-beds
start esx_carlock
start LockSystem3.1
start esx_nightclub-master
start hailmary
start jsfour-criminalrecord
start seatbelt
#start beltsound
start radialmenu
start lspdloader
start phxlspd
start veliefendi
start NoReticle
start screenshot-basic
#start esx_jb_weashops-master
start ExternalVehicleCommands-master
start vehicle-control
start esx_guy293_holsterweapon
start Radiant_Animations2

16 GB RAM,
6 core CPU
400 mbps up/down

Christ, that is your problem right there (well, not inherently, but I doubt it helps): having that many resources is bound to cause issues.

Anyway, as for your ping issues, the speed of your server network connection is not necessarily the problem, I suspect your issue is likely due to the fact that once you get up to 40 players, the client that is the host at that time is simply having a hard time keeping up with that many clients, and there is not really a whole lot you can do about that.

on my linux server have 100 mbps up/down and this never happened. I saw 65 players in Linux server with no problem.

Then maybe long-term, moving back is your best option - sacrifice Webpack for stability. Anyway, hold off for a while, see if anyone else has any ideas, good luck.

I need help this problem guys, really.