SRCDS Steam group


[RESOLVED] Major network lag with client / server
#1
Hello,
I seem to have an issue with my TF2 server and / or client. Whenever I have the server up and start a TF2 client on any computer (including the same one the server is on) and go to the server list, the entire network lags or crashes entirely depending on how many people are in the server. Here are my specs and my information:

BASIC INFO
Server OS: Windows XP Service Pack 3 32-bit
Processor: AMD Athlon II X2 4400e, dual cores, 2.71 ghz
Ram: 4 GB (3.25 utilized due to XPs limitations)
Game(s): Team Fortress 2
Start Up Command: c:\HLserver\orangebox\srcds.exe -game tf -port 27015 +maxplayers 32 +map trade_rawr_v2_2
Admin Mods: SourceMod, Metamod

INSTALLING INFO
Full Install Command: c:\HLServer\hldsupdatetool -command update -game "tf" -dir c:\HLServer

NETWORK AND BANDWIDTH INFO
Bandwidth: http://www.speedtest.net/result/2054648024.png
Router: D-Link DIR-655
Local IP of Server: 192.168.0.100
External IP: 24.45.168.254
Port Forwarding Screen Shot: http://i48.tinypic.com/2znvjw8.jpg

I tried changing the ports that the server used since I figured it may be some conflict, but still nothing was resolved. I'm pretty lost as to why this is happening and any input or solutions would be greatly appreciated!

Reply
#2
Judging by what you're saying, two things come to mind.

1. You have a very weak processor which may not be able to handle the load..

2. Your Internet connection is way to slow. This is not it though. Your connection should easily be able to handle this.

I'm thinking it's the processor personally.
About Me:
I help people who at least try to help themselves. Please use the "Search" button before posting a new topic.
If you post, give us the info we need from the "READ ME FIRST" sticky at the top of each thread!

I'm here to share my experiences to help others. If I'm wrong about something, don't hold it against me, educate me.
I not perfect and try to learn from every failure, yours and mine.
Reply
#3
(07-11-2012, 05:41 AM)scso1502 Wrote:  Judging by what you're saying, two things come to mind.

1. You have a very weak processor which may not be able to handle the load..

2. Your Internet connection is way to slow. This is not it though. Your connection should easily be able to handle this.

I'm thinking it's the processor personally.

It's my network that lags though. How would the processor be an issue with that? If the server is up and I start a client on any computer on the same network, then open the server list on that client, the network will lag and / or crash. But if the server is not up, it's all fine and dandy.
Reply
#4
Take a look at this Steam post (https://support.steampowered.com/kb_article.php?ref=5386-HMJI-5162) about running dedicated servers servers and clients from the same PC. According to the what I'm reading in the article, and assuming you're trying to do Number 2 or Number 3 below, It appears you're trying to do something that is unsupported:

Quote:1. Listen Server
A listen server is launched within the game you wish to play.
It has a minimal control panel.
A listen server requires the Steam Client and your game to be running.
All the stock game content is contained in a single cache file.
Client HLDS Server

2. The HLDS Server is available from the Tools menu.
Players must connect to it from LAN or over the internet. (You cannot play from the same computer as is hosting the game.)
The HLDS server requires Steam Client to always be running.
It has a full server control panel.
All the stock game content is contained in a single cache file.

3. Stand-Alone HLDS_1120 Server or Source Dedicated Server
Stand-alone servers are independent from Steam.
It does not require Steam client to be running.
Players must connect to it from a LAN or over the internet. (You cannot play from the same computer as is hosting the game.)
There are no cache files, all game content and resources are unpacked.
Source Servers must be installed in separate folders from HLDS Servers.

Don't ask me why, but I believe it has to do with how the two processes (server and client) fighting over CPU priority and both require a ton of CPU power to function.

About Me:
I help people who at least try to help themselves. Please use the "Search" button before posting a new topic.
If you post, give us the info we need from the "READ ME FIRST" sticky at the top of each thread!

I'm here to share my experiences to help others. If I'm wrong about something, don't hold it against me, educate me.
I not perfect and try to learn from every failure, yours and mine.
Reply
#5
What I'm doing is #3 on that list, a stand-alone one. However, "(You cannot play from the same computer as is hosting the game.)" is not always true. I host the servers on a different computer than I play on, but what I was just stating earlier is that it doesn't matter what computer I run a client on, it will lag. I'm sorry if I wasn't really clear on that. But the computer I'm on right now does not host the server, this is the computer I play and do stuff on, while the server is hosted on my other computer. However, if I start up TF2 on this right now and open the server list, then the network will most likely lag to hell for a bit.

What I did take note of is that if its the first time a TF2 client is started for the day, the lag will NOT occur. This leads me to believe the router is trying to use some port / assign it after it starts up, and keep it assigned until this computer logs off of the network. Because of this, the server may have issues when that port is being used again, or in other words, after I start up TF2 again and open the server list. I also noticed that after I updated the firmware to the most recent one, the lag became less of an issue; instead of 5 minutes of hell, it became small jumps of lag for around 1 minute and then would just die away.
Reply
#6
Very Interesting... Perhaps try to use a different port for your client machine then. If you don't know how, here's the way:
  • Right-click on your Steam tray icon and select "Library"
  • Right-click on Team Fortress 2 and select "Properties"
  • Click "Launch Options"
  • Add +clientport 27006 to the input field and hit "ok" (default port is 27005)
  • Restart Steam and Launch TF2 to test it.

I know it's a stretch, but it's worth a try. Crossing fingers! Let me know.. I'm very curious about this now.
About Me:
I help people who at least try to help themselves. Please use the "Search" button before posting a new topic.
If you post, give us the info we need from the "READ ME FIRST" sticky at the top of each thread!

I'm here to share my experiences to help others. If I'm wrong about something, don't hold it against me, educate me.
I not perfect and try to learn from every failure, yours and mine.
Reply
#7
After doing that plus updating my router's firmware again (apparently it mis-reported what the most recent one was), the lag seems to have stopped. I'm assuming it's fixed for now since it hasn't occurred all day. If it occurs again I'll be sure to report it back here, but for now, thank you very much for your help!
Reply
#8
Actually, not everything is perfect. I noticed the server doesn't show up in the server list for some reason. People can join fine with no issues but they can't seem to find it in the main list. Any idea as to why that occurs?
Reply
#9
Double-check the ports you opened to your local IP address the server is on.

I noticed you have a type-o on the HLServer Router TCP port entry on your screenshot. You're missing the "5" for 27015. It only shows "2701" Maybe this is why it's unable to use it? Correct that entry and use the command line I listed above.

Let us know.

About Me:
I help people who at least try to help themselves. Please use the "Search" button before posting a new topic.
If you post, give us the info we need from the "READ ME FIRST" sticky at the top of each thread!

I'm here to share my experiences to help others. If I'm wrong about something, don't hold it against me, educate me.
I not perfect and try to learn from every failure, yours and mine.
Reply
#10
Oh I fixed that type-o the other day, sorry for not posting that. I also combined the ports into one entry (I was using two entries for testing something), but it still doesn't work. Here's an image of the new entry: http://pokit.org/get/img/e33e2602b3b8ecf857f8fa8d284f0ea3.jpg Also, which command-line are you referring to? I did the +clientport one if you meant that one.
Reply
#11
The command line I'm referring to is what you do to start your server. There are two ways to do it. One way is to start it using the run command and entering a long string. Here's just one such command line:

C:\srcds\orangebox\srcds.exe -game tf -console +ip 111.222.333.444 -port 27015 +maxplayers 18 +exec server.cfg +map ctf_2fort

The other way is by putting that string into a batch file and running the batch file to do it for you. This link tells you how to do both:

http://www.srcds.com/db/engine.php?subaction=showfull&id=1097362093&archive=http://

Please post what your command line is we can make sure you're starting it correctly. Something as simple as starting your server the wrong way can cause your problem.

We'll get it figured out..
About Me:
I help people who at least try to help themselves. Please use the "Search" button before posting a new topic.
If you post, give us the info we need from the "READ ME FIRST" sticky at the top of each thread!

I'm here to share my experiences to help others. If I'm wrong about something, don't hold it against me, educate me.
I not perfect and try to learn from every failure, yours and mine.
Reply
#12
I use a .BAT file to start the server and the commandline I use is

c:\HLserver\orangebox\srcds.exe -game tf -port 27015 +maxplayers 32 +map trade_rawr_v2_2

Also, here is my server.cfg

// Server Name
hostname "*UaS* Clan Trade Server"

// Execute Banned Users //
exec banned_user.cfg
exec banned_ip.cfg

ip 192.168.0.100
hostport 27015


tf_server_identity_account_id xxxxxx
tf_server_identity_token "xxxxxxx"

// Rcon Cvars
rcon_password "" //Set's remote control password
sv_rcon_banpenalty 15 //Number of minutes to ban users who fail rcon authentication
sv_rcon_log 1 //Enable/disable rcon logging.
sv_rcon_maxfailures 3 //Max number of times a user can fail rcon authentication before being banned
sv_rcon_minfailures 5 //Number of times a user can fail rcon authentication in sv_rcon_minfailuretime before being banned
sv_rcon_minfailuretime 10 //Number of seconds to track failed rcon authentications

// Server Password
sv_password "" // Password protects server

// Server Cvars

sv_allow_color_correction 1 //Allow or disallow clients to use color correction on this server.
sv_allow_wait_command 0 //Allow or disallow the wait command on clients connected to this server.
sv_allowdownload 1 //Allow clients to download files
sv_allowupload 1 //Allow clients to upload customizations files
sv_alltalk 1 //Players can hear all other players, no team restrictions
sv_alternateticks 0 //If set, server only simulates entities on even numbered ticks.
sv_autosave 0 //Set to 1 to autosave game on level transition. Does not affect autosave triggers.
sv_bonus_challenge 0 //Set to values other than 0 to select a bonus map challenge type.
sv_cacheencodedents 1 //If set to 1, does an optimization to prevent extra SendTable_Encode calls.
sv_cheats 0 //Allow cheats on server
sv_clearhinthistory 0 //Clear memory of server side hints displayed to the player.
sv_consistency 1 //Whether the server enforces file consistency for critical files
sv_contact "uasmatrix@aim.com" //Contact email for server sysop
sv_downloadurl "" //Location from which clients can download missing files
sv_enableoldqueries 1 //Enable support for old style (HL1) server queries
sv_pausable 0 //Is the server pausable.
sv_gravity "400" // Dat gravity (800 is default, around 400 is RAWR)

mp_allowspectators 1 //Toggles whether the server allows spectator mode or not
mp_autocrosshair 0
mp_autoteambalance 0 //Toggles server autoteambalance
mp_bonusroundtime 0 //Time in seconds after round win until round restarts
mp_chattime 0 //amount of time in seconds players can chat after the game is over

mp_decals 1
mp_defaultteam 1
mp_disable_autokick 1 //Prevents a userid from being auto-kicked
mp_disable_respawn_times 1
mp_enableroundwaittime 1 //Enable timers to wait between rounds.
mp_fadetoblack 0 //fade a player's screen to black when he dies
mp_falldamage 5 //Amount of damage players sustains from a fall
mp_flashlight 0 //Toggles flashlight on or off
mp_footsteps 1 //Toggles footsteps on or off
mp_forcerespawn 1
mp_fraglimit 0
mp_idledealmethod 1 //Deals with Idle Players. 1 = Sends them into Spectator mode then kicks them if they're still idle, 2 = Kicks them out of the game
mp_idlemaxtime 30 //Maximum time a player is allowed to be idle (in minutes)
mp_maxrounds 9001 //max number of rounds to play before server changes maps
mp_teams_unbalance_limit 0 //Teams are unbalanced when one team has this many more players than the other team. (0 disables check)
mp_time_between_capscoring 5 //Delay between scoring of owned capture points.
mp_timelimit 0 //game time per map in minutes
mp_winlimit 0 //Max number of rounds one team can win before server changes maps


// Lan or internet play, Server region cvars
sv_lan 0 //Server is a lan server ( no heartbeat, no authentication, no non-class C addresses )
sv_region 255 // Region Codes: 0 - US East coast, 1 - US West coast, 2 - South America, 2 - South America, 3 - Europe, 4 - Asia, 5 - Australia, 6 - Middle East, 7 - Africa, 255 - world

//server Logging
sv_log_onefile 0 //Log server information to only one file.
sv_logbans 1 //Log server bans in the server logs.
sv_logblocks 0 //If true when log when a query is blocked (can cause very large log files)
sv_logecho 1 //Echo log information to the console.
sv_logfile 1 //Log server information in the log file.
sv_logflush 0 //Flush the log file to disk on each write (slow).
sv_logsdir "logs" //Folder in the game directory where server logs will be stored.

//Server Rates
sv_maxcmdrate 0 //(If sv_mincmdrate is > 0), this sets the maximum value for cl_cmdrate.
sv_maxrate 0 //Max bandwidth rate allowed on server, 0 == unlimited
sv_maxreplay 2 //Maximum replay time in seconds
sv_maxupdaterate 300 //Maximum updates per second that the server will allow
sv_mincmdrate 0 //This sets the minimum value for cl_cmdrate. 0 == unlimited.
sv_minrate 0 //Min bandwidth rate allowed on server, 0 == unlimited
sv_minupdaterate 25 //Minimum updates per second that the server will allow

writeid
writeip
Reply
#13
OK, thank you for posting your command line. Here's your problem. The server isn't showing up on the Main Steam Server list because you are not specifying the correct IP address when starting the server. You are using your internal IP address that's assigned by a router at your location. You need to use the main IP address that is assigned to your home Internet modem by your Internet service provider. Here's what you need to do:

1. Open your server.cfg and remove this stuff because it's useless:

ip 192.168.0.100
hostport 27015


2. Go to this website and obtain your IP address:

http://www.showmyip.com

As soon as you go to that page, your correct EXTERNAL IP address will be shown at the very top of the page.

3. Edit the bat file you use to start the server and make the command line look like this:

c:\HLserver\orangebox\srcds.exe +ip xxx.xxx.xxx.xxx -game tf -port 27015 +maxplayers 32 +map trade_rawr_v2_2

4. Set the "xxx.xxx.xxx.xxx" in the command line to the IP you got from the showmyip website.

5. Save the bat file and launch the server. Give it about 5 minutes then see if the server now shows up on the Master List.

Let me know how it goes. Good Luck!

About Me:
I help people who at least try to help themselves. Please use the "Search" button before posting a new topic.
If you post, give us the info we need from the "READ ME FIRST" sticky at the top of each thread!

I'm here to share my experiences to help others. If I'm wrong about something, don't hold it against me, educate me.
I not perfect and try to learn from every failure, yours and mine.
Reply
#14
I thought that IP has to be the LAN IP though, so it can use the ports. I tried setting it to my external IP and it gave me this error:

---------------------------
Engine Error
---------------------------
Couldn't allocate any server IP port
---------------------------



Reply
#15
It definitely needs to be the external IP. Engine Error? Hummmm.... There's something else wrong. Adding the External IP to the command line shouldn't cause that. Can you please double-check the command line. If something else has changed since we started or you don't find an error in the command line, I recommend re-running the HLDSupdatetool on the server to verify all the files are still intact. Something's weird here now..
About Me:
I help people who at least try to help themselves. Please use the "Search" button before posting a new topic.
If you post, give us the info we need from the "READ ME FIRST" sticky at the top of each thread!

I'm here to share my experiences to help others. If I'm wrong about something, don't hold it against me, educate me.
I not perfect and try to learn from every failure, yours and mine.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)