Client has to wait long for its answer after many queries served, although server is still fast



Dear all,

I have the following setup (OS is Linux 2.6.16.43.1.amd64-smp, Debian
Sarge):

1. A server written in C++: It waits for a request on a given port
(using accept), reads whatever is sent (using read), computes an
answer string, sends it back (using write), then closes the connection
(using close).

2. A client written in PHP: It opens the connection (using fsockopen),
sends the request string (using fwrite), reads the data (using fgets),
then closes the connection (using fclose).

Queries come in at an average rate of about one query per second. The
server needs a few milliseconds to compute the answer string

The whole thing works fine for the first, say, 10,000 queries.

Then, for some reason that I don't understand, it happens more and
more often that the client has to wait several hundred milliseconds
before it receives the first data.

Everything is still fine on the server side: computing and sending
still just takes a few milliseconds.

When I restart the server everything is back to normal again. The
phenomenon also happens when only few queries have been processed, but
rarely. After the aforementioned 10,000 queries it becomes the rule
rather than the exception, but there are still queries for which
everything is fine then.

Any ideas what might be happening here?

thanks for your help,

Holger

.



Relevant Pages

  • Re: [WARNING] Failed to query SPN registration on DC
    ... DNS server: User Specified DNS Server ... UDP port 53 responding to queries: ... iescrkads01.jw-uk.jameswalker.co.uk Unknown ...
    (microsoft.public.windows.server.active_directory)
  • Re: Non-existent A record being returned...
    ... ; Query 1 ... These DNS servers are set up to forward queries to two other DNS ... Nslookup has it's own resolver service, and doesn't rely or use Windows resolver service, or the local cache, but rather directly queries DNS, where I'm assuming you're referring to clearing the DNS server cache? ...
    (microsoft.public.windows.server.dns)
  • Re: ntp.conf access resctriction
    ... That is allow time service from anyone, but allow only queries ... LAN is not allowed control though. ... your time requests sent to external servers, ... these 'restrict' options have pretty complex/obscure semantics, ...
    (comp.unix.bsd.freebsd.misc)
  • RE: Limit W2K Queries.
    ... please let me know why there is a firewall appliance ... 60Subject: RE: Limit W2K Queries. ... Microsoft CDO for Windows 2000 ... 60>60One stand alone Windows 2000 server (an e-Gap Remote ...
    (microsoft.public.win2000.networking)
  • Re: A few thousands simple queries seem to clog SQL server (for a while)
    ... >queries using the OleDB DataReader, ... the SQL server seems to be clogged and starts failing all ... > dbParams, Object& executeResult) ... > connection to the database. ...
    (microsoft.public.dotnet.framework.adonet)