NT Service and Sockets



Hello

I'm wondering if someone can help me out with a socketty problem within an
NT service application.

The application is very simple -it sits in the background looking at a list
of email accounts and periodically downloads any new emails it finds. The
emails are downloaded to a shared server folder and then details written
away to a database.

The database in question is a MUMPs - or m21- database, but the nature of
the database is unimportant.

The service app connects to the database via an IP address and socket. Once
connected , it does it stuff and then closes the connection - so the
connection is only ever open for a brief preiod of time.

Now every so often, when it opens the connection it reports "Socket already
in use". No it bl**dy well isn't.

The part of the application that writes to the database is within a Thread
(there is only ever one of these). The entire functionality of the code is
surrounded by Critical Sections and there's no chance that the code can be
executed twice concurrently. The code is virtually saturated in log file
commands so that I can pinpoint exactly where the error occurs and this is
when the socket connects.

I'm using delphi 7, socket components are OverbyteICSWSocket.

I'm completely stumped by this problem. It occurs more frequently if the PC
is under load, less frequently (but still regularly happens) if the PC is
doing relatively nothing. I've even tried introducing delays and sleeps and
ProcessRequests, but with no success.

Hope someone can help, but any contribution is appreciated.

Thanks

Steve


.



Relevant Pages

  • [Microsoft][SQLServer 2000 Driver for JDBC]net dll not initi
    ... when attempting to query the database. ... Also, once the exception ... Successive calls to get a connection from the ... dll not initialized: socket write error ...
    (microsoft.public.sqlserver.jdbcdriver)
  • connection always drop.. when pump in huge data into the MSSSQL DB
    ... the connection is always drop when i pump in a huge data ... such as 5000 records in the MSSQL database. ... establishing socket. ...
    (microsoft.public.windows.server.general)
  • Connection Drop..
    ... the connection is always drop when i pump in a huge data ... such as 5000 records in the MSSQL database. ... establishing socket. ...
    (microsoft.public.windows.server.sbs)
  • Re: Best way to check oracle database server / services is alive using Java
    ... At the moment I just attempt to connect to the server IP using Socket ... and conclude the database is not running if connection timed out. ... and if you can't get a socket to the DBMS ... but all currently existing connections may be operating ...
    (comp.lang.java.databases)
  • How to Access Database from a C++ program in Linux
    ... I'm developing a test tool that will collect information from a file. ... The data collected from the file is parsed and put on to socket. ... But I did not from database. ... Can anyone guide me in connecting my C++ program to MySql database. ...
    (comp.unix.programmer)