Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TidHTTPServer and timeout



Permlink Replies: 1 - Last Post: Mar 28, 2016 11:38 AM Last Post By: Remy Lebeau (Te...
Eduardo Elias

Posts: 319
Registered: 9/20/12
TidHTTPServer and timeout
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 26, 2016 6:55 PM
I am using XE2 vcl win32

I have an application that is a rest server using TidHTTPServer and works
just fine.

However I noted that if for some reason the server takes longer to process
the request the http connection drops.

I am not sure which side is dropping the connection (the problem happens
in local connections, so it is not the medium)

What I need is to make this time little longer.

Where can I see what is going on and how to change that if it is server side?

Eduardo
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: TidHTTPServer and timeout
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 28, 2016 11:38 AM   in response to: Eduardo Elias in response to: Eduardo Elias
Eduardo wrote:

However I noted that if for some reason the server takes longer
to process the request the http connection drops.

I am not sure which side is dropping the connection

It would have to be the client side, since the server side is busy processing
the request.

The real question is, why is your server taking so long to reply to the client
in the first place?

What I need is to make this time little longer.

That depends on the client's implementation. There is nothing you can do
on the server side to make the client wait longer. Unless you send the response
in chunked mode so the client can read pieces as the server is generating
them. By default, TIdHTTPServer does not send a response until the full
response data is made available. Sending a response in chunked mode would
require some manual work, and may or may not be feisable in your code, depending
on how you are creating the response data in the first place.

Where can I see what is going on

Use a packet sniffer to watch the network traffic. You will likely see the
client close its end of the connection first.

how to change that if it is server side?

It is not. Unless the server is raising a exception that closes the connection.
But it does not sound that like that is happening.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02