Fieldpine Logo

 Quick Links: Site Home | Gds Documentation | All Documentation

HTTP.exe Gds Agent

The http.exe program is the main program to interact directly with browsers. It is responsible for the following


During startup, this program creates the file "CrashStartup http.Txt". This name does not mean it crashed, rather it encountered unexpected problems. The name CrashStartup was chosen to be very obvious. You may read the contents of this file. If the startup has no problems, this file will be removed.

If you start http.exe when "CrashStartup http.txt" already exists, it internally switches to a more verbose logging mode and writes more detail of startup progress

Once the startup has created a Query Exchange Billboard, problems are typically logged to both this log file and the Query Exchange error logs

You should always be able to start http.exe and connect to the port(s). You can even run this program as the only program and not start Gds generally.

You may run multiple copies of this program and they will attempt various round robin and load sharing options, but generally on Windows one program will take all the network traffic

Example CrashStartup Http.Txt file
Status,Version: May 15 2015 07:44:06
Status,Using verbose logging mode
Status,Preparing system defaults
Status,Calling start handler
Status,Open Shared Memory
Status,Use Shared Memory
Status,Creating Billboard
Status,Publishing billboard
Status,Reading gds.ctl
Error,Unrecognised ctl line: alias
Status,Ctl read
Status,Starting interface Port 8310
Status,Starting interface Port 9003
Status,Listeners started: 2
Status,Listener thread waiting to bind port 8310
Status,Listener thread waiting to bind port 9003
Status,Listener thread has bind to port 8310
Status,Listener thread has bind to port 9003


If you terminate this process all HTTP network connections may be instantly broken and errors returned to client browsers. As this program essentially acts as a network protocol converter there should be no need to terminate this program without stopping all of Gds.

Stopping this program does not guarantee network connections will be dropped. http.exe uses high reliability techniques and network connections can survive process termination.

Configuring for High Load

Create multiple http processes to handle the network connections. Each http process is capable of supporting up to 2000 active TCP connections. Having multiple http processes also means that a process failure will not reset all network connections. The drawback with multiple processes is a small increase in cpu and memory load

; Http, must have minimum 1 or cannot use the system interactively
agent http
minimum 3
maximum 20
option(http) sender=3
option(http) maxagent=2

If multiple http processes are running, then you may wish to create a control port for each agent, otherwise you will be assigned a random agent process. This is done by allocating a control port and appending a + after the port number. The + flag tells each http agent to increase the port number until it finds the first free one.

For the example below, the first http agent will be listening on port 12345, the second on port 12346

; Create a port that can only control Gds

Error Codes

100 - Socket Write Fail N a.b.c.d
This error is logged when we attempted to write to a socket and it failed. This occurs in normal operation and should not be cause for concern. The value N in the error message is from GetLastError() and gives the exact network failure code. Some network failure codes are more concerning than others. Code 10054 is minor and can occur with normal operation, it is logged only as large volumes of them at once can be interesting.

A common example will be Socket Write Fail 10054 a.b.c.d which can easily be generated on some browsers by rapidly creating network requests and cancelling them, such as webpages that search between each keystroke.

Technically, the following pseudo sequence has occurred (actual code is more complex, it retries and correctly handles partial buffer transmission):

		int sentlen = send(targetsocket, buffer, tosendlen, 0);
		if (sentlen != tosendlen) Log this error

101 - Socket listener accept error N (Port P) Source=a.b.c.d
The listener accepts all new network connections and this should always work except in rare circumstances. This error is reported when an accept failed. If you are gettinng lots of these, you should report the "error N" message to your computer support staff.

Technically, the following pseudo sequence has occurred:

		HANDLE hRem = accept(listensocket, ...);
		if (hRem == INVALID_SOCKET) Log this error

102 - Socket listener failed to init WinSock N (Port P)
The system failed to initialise Windows network. This is a very low level and serious problem that probably stops all operation of http.exe The error code N should be reviewed and you should check the hardware interfaces and TCP stack on this machine.

Technically, the following pseudo sequence has occurred:

		WSADATA wsa;
		WORD vReq = MAKEWORD(2,0);
		if (WSAStartup(vReq, &wsa) != 0) Log this error

103 - Socket listener failed to create socket N (Port P)
104 - Socket listener failed(2) to create socket N (Port P)
After initialising the network the system has failed to create its first socket to the network. This is a fatal error for this Port.

Technically, the following pseudo sequence has occurred:

		hSock = socket(AF_INET, SOCK_STREAM, NULL);
		if (hSock == INVALID_SOCKET) Log this error
105 - Socket listener failed to bind socket P (Port P). Retrying for 5 minutes
A socket has been created but we have failed to bind() with it. A bind() is required in order to correctly create and use the socket. The most common cause is some other application already has the port open.

We suggest using

netstat -nao
or similar command to identify the process that has the port and correcting that program. Multiple copies of http.exe can share the socket and will not generate this error.

Technically, the following pseudo sequence has occurred:

		int r = bind(mysocket, ...);
		if (r == SOCKET_ERROR) Log this error

Performance Testing

You can test the speed at which http.exe can deliver HTTP requests, the so called echo tests. ( /debug/http/echotest.htm ) With an echo test a client program, typically a browser loops at full speed requesting an echo page from http.exe. Http.exe replies directly to the echo page request.

An echo test will respond with different results depending on server speed, network interface speed, browser type and number of network hops the browser is from the client. The results returned from an echo test are what ONE client can achieve, but http.exe should be able to deliver similar results to multiple clients, depending on what resource is limiting performance. In most echo tests, the browser itself is the limiting resource as it has the greater work to do.