Forum


Notice to all users

We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020

Results 1 to 12 of 12
  1. #1
    Join Date
    June 2005
    Location
    Germany
    Posts
    124

    serverQuery: Is there a delay in answering queries from remote hosts?

    Is the server delaying the "error id=0 msg=ok" after every command reply for about 0.2 seconds?

    *edit* see post 5 for better explanation */edit*

    I took a look today to find out, what takes so long when querying servers. When testing (edit: with php) on localhost i discovered, that when i connect to it on 127.0.0.1 it answers commands and sends "error id=0 msg=ok" instantly after the command answer. When i connect to the server on localhost it answers the commands also directly but "error id=0 msg=ok" comes delayed with about approx. 0.2 seconds.

    Is this a bug or by design?
    Its a problem for me cause i query a lot of servers and tried to find out how to speed up things a little. After measuring the execution time of the scripts there was only optimization possible of about 0.030 ms time increase. But this delayed "error id=0 msg=ok" needed about 1.4 seconds.

    For example:
    - server query script time: 1.5 seconds
    - waiting for ts3 server query "error id=0 msg=ok": 1.4 seconds
    - parsing and working on informations: up to 0.1 seconds

    Thank you for reading.

    Mariusz Bieniek
    http://www.tsviewer.com
    Last edited by ginger|HFD; August 3rd, 2014 at 01:46 PM.

  2. #2
    Join Date
    December 2009
    Location
    UK
    Posts
    769
    The only educated guess I can make is that when you query by hostname that has to be resolved to an IP address, so adding an extra step (two if the hostname is a CNAME to an A record)

    Edit: So the only thing I can suggest is forcing your users to supply an IP address rather than a hostname

  3. #3
    Join Date
    January 2010
    Location
    El Prat de Llobregat (Barcelona, Spain)
    Posts
    2,698
    Quote Originally Posted by Air SeaTac View Post
    Edit: So the only thing I can suggest is forcing your users to supply an IP address rather than a hostname
    Bad solution because, it's my case, I have a dynamic IP so in tsviewer i have to declare an addressname from dyndns.

  4. #4
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,368
    It is technically impossible for this bug to exist at serverside, see RFC 791 and RFC 793.
    Additionally, I don't have the bug. Must be your framework or something else. The only thing I have is that the windows telnet client takes a second to start for localhost but starts instantly for 127.0.0.1. YaTQA doesn't care and connects instantly.

  5. #5
    Join Date
    June 2005
    Location
    Germany
    Posts
    124
    Sorry i wasnt precise enough and got it not correct on the first try to describe it.

    Its not about if its a DNS or direct ip. Its about a delay if it is remote connection.

    When i telnet my teamspeak server (running in the internet) from my home computer, its a remote connection and i get this "delay" but only for the line "error id=0 msg=ok". The first part of the reply comes instantly.

    When i telnet the teamspeak server directly from the host its running on, there is no delay whatsoever.

    I do not mean some internet connection delay or something. Its just this line "error id=0 msg=ok" is delayed by the server when it is a remote connection.

    command: version
    answer (instant): version=3.0.10.3 build=1388593719 platform=Windows
    answer (delayed) second part: error id=0 msg=ok

    I can demonstrate it for example with when querying the server with php. Somehow the ts server thinks its a remote connection when i connect to localhost. Querying and parsing needs 1.036 seconds then (see screenshot).

    Click image for larger version. 

Name:	ts3_localhost.PNG 
Views:	58 
Size:	8.4 KB 
ID:	11063

    When connecting to 127.0.0.1 it takes 0.030 seconds to get everything done, see this screenshot:

    Click image for larger version. 

Name:	ts3_127.PNG 
Views:	62 
Size:	8.5 KB 
ID:	11064


    Can you guys observe the delay with remote connections (not from localhost) too?

    Regards
    Mariusz Bieniek
    http://www.tsviewer.com
    Last edited by ginger|HFD; August 3rd, 2014 at 01:49 PM.

  6. #6
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,368
    As I already said, the TS server cannot think it's a remote connection. Read the linked RFCs. They clearly explain why this cannot be.

  7. #7
    Join Date
    June 2005
    Location
    Germany
    Posts
    124
    Why not? I dont mean the TCP protocol and its inner workings.

    The server does see the origin IP and could simply delay if the query is not comming from the same machine.

    if(!127.0.0.1) {
    delay();
    }

    This is not about TCP. The question is if there is a delay when querying a TeamSpeak server not from the same machine.

  8. #8
    Join Date
    June 2005
    Location
    Germany
    Posts
    124
    Looking further into it with ScP. Will report if i can verify more surely what happens there.

  9. #9
    Join Date
    June 2005
    Location
    Germany
    Posts
    124
    Embarassing. Its a windows issue! I didnt check it on a linux system before writing here. One test more would have been enough to stumble about it, but meh

    Sorry guys for making a false alarm

    When connecting from windows via telnet to a teamspeak server there is a delay before the msg=ok line. On linux to linux there is not O_o

    Windows (to remote teamspeak server):
    Click image for larger version. 

Name:	windows.PNG 
Views:	78 
Size:	39.2 KB 
ID:	11066

    Linux (to remote teamspeak server):
    Click image for larger version. 

Name:	linux.PNG 
Views:	86 
Size:	39.7 KB 
ID:	11065

  10. #10
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,368
    Quote Originally Posted by ginger|HFD View Post
    Why not? I dont mean the TCP protocol and its inner workings.

    The server does see the origin IP and could simply delay if the query is not comming from the same machine.

    if(!127.0.0.1) {
    delay();
    }

    This is not about TCP. The question is if there is a delay when querying a TeamSpeak server not from the same machine.
    Name one difference between 127.0.0.1 and localhost on TCP or IP basis.

  11. #11
    Join Date
    June 2005
    Location
    Germany
    Posts
    124
    There is none. You didnt get my question right. There is no need to bash with TCP protocol knowledge here.
    Its good you know it and I thank you for pointing me at the right direction!

    Chillax.

  12. #12
    Join Date
    December 2004
    Location
    RF
    Posts
    3,008
    Try something like Leatrix Latency Fix and repeat your tests.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Resolved] Premium support not answering WTH?
    By GoNz0 in forum General Questions
    Replies: 7
    Last Post: June 15th, 2015, 05:46 PM
  2. Replies: 4
    Last Post: July 19th, 2013, 02:07 PM
  3. Hosts
    By Billy_the_Puppet in forum General Questions
    Replies: 1
    Last Post: February 19th, 2010, 08:06 PM
  4. IP Hosts?
    By kingofpain21 in forum General Questions
    Replies: 3
    Last Post: January 21st, 2010, 09:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •