Home All Groups Group Topic Archive Search About

VB6 applications with SQL Server and Adobe

Author
20 Mar 2006 5:26 PM
Clive Summerfield
I have ONE server with a SQL Server 2000 DB and the following applications
running on it.  Application 1 loads data from a TCP/IP stream into the
database.  Application 2 prepares an output file from the data.  Applications
3 and 4 moves the files about according to parameters in the database. 
Application 5 calls the Adobe distiller object in order to produce a pdf from
the output file.  Application 6 monitors the database.  Applications 2,3,4,5,
and 6 poll the database to see if there is anything for them to do.

My problem is when Application 5 is running, sometimes it freezes, sometimes
application 2 or application 4 freezes.

Am I being too hopeful expecting all this lot to run on one server?  Nothing
I have seen in error or events give me a clue as to why it all stops.

Author
20 Mar 2006 7:35 PM
ralph
Show quote Hide quote
"Clive Summerfield" wrote:

> I have ONE server with a SQL Server 2000 DB and the following applications
> running on it.  Application 1 loads data from a TCP/IP stream into the
> database.  Application 2 prepares an output file from the data.  Applications
> 3 and 4 moves the files about according to parameters in the database. 
> Application 5 calls the Adobe distiller object in order to produce a pdf from
> the output file.  Application 6 monitors the database.  Applications 2,3,4,5,
> and 6 poll the database to see if there is anything for them to do.
>
> My problem is when Application 5 is running, sometimes it freezes, sometimes
> application 2 or application 4 freezes.
>
> Am I being too hopeful expecting all this lot to run on one server?  Nothing
> I have seen in error or events give me a clue as to why it all stops.



It is impossible to say what is causing the problem, (I don't know squat
about your solution or the problem domain), but the most common cause for a
suite of applications to behave like this, is a lockup over some common
resource - two apps waiting for the other, some app waiting for another to
finish, who's waiting for..., &etc.

Draw out a collaboration diagram showing all your components/apps, the
resources and messaging between them. Back up about 12,00 feet and see if it
makes sense.

Meanwhile, add some logging to your apps so you can determine where and why
they are hanging.

Don't look for something too exotic or for a mysterious feature of a server
- it is something you doing to yourself. <g>

hth
-ralph
Author
20 Mar 2006 9:33 PM
DEZ
That  is a latch contention in databases and one of the potential
solutions is to increase the System Global Area in case of an Oracle 9i
DB. alter database set SGA=(size)

ralph wrote:
Show quoteHide quote
> "Clive Summerfield" wrote:
>
> > I have ONE server with a SQL Server 2000 DB and the following applications
> > running on it.  Application 1 loads data from a TCP/IP stream into the
> > database.  Application 2 prepares an output file from the data.  Applications
> > 3 and 4 moves the files about according to parameters in the database.
> > Application 5 calls the Adobe distiller object in order to produce a pdf from
> > the output file.  Application 6 monitors the database.  Applications 2,3,4,5,
> > and 6 poll the database to see if there is anything for them to do.
> >
> > My problem is when Application 5 is running, sometimes it freezes, sometimes
> > application 2 or application 4 freezes.
> >
> > Am I being too hopeful expecting all this lot to run on one server?  Nothing
> > I have seen in error or events give me a clue as to why it all stops.
>
>
>
> It is impossible to say what is causing the problem, (I don't know squat
> about your solution or the problem domain), but the most common cause for a
> suite of applications to behave like this, is a lockup over some common
> resource - two apps waiting for the other, some app waiting for another to
> finish, who's waiting for..., &etc.
>
> Draw out a collaboration diagram showing all your components/apps, the
> resources and messaging between them. Back up about 12,00 feet and see if it
> makes sense.
>
> Meanwhile, add some logging to your apps so you can determine where and why
> they are hanging.
>
> Don't look for something too exotic or for a mysterious feature of a server
> - it is something you doing to yourself. <g>
>
> hth
> -ralph
Author
20 Mar 2006 9:37 PM
DEZ
Your server is one thing but the database System  Global Area maybe
another for latch contention when mutiple parsing in a table happens.
In Oracle 9i you could alter the SGA dynamically by the command: alter
database set SGA=(size depends on machine);
What kind of DB are you using



ralph wrote:
Show quoteHide quote
> "Clive Summerfield" wrote:
>
> > I have ONE server with a SQL Server 2000 DB and the following applications
> > running on it.  Application 1 loads data from a TCP/IP stream into the
> > database.  Application 2 prepares an output file from the data.  Applications
> > 3 and 4 moves the files about according to parameters in the database.
> > Application 5 calls the Adobe distiller object in order to produce a pdf from
> > the output file.  Application 6 monitors the database.  Applications 2,3,4,5,
> > and 6 poll the database to see if there is anything for them to do.
> >
> > My problem is when Application 5 is running, sometimes it freezes, sometimes
> > application 2 or application 4 freezes.
> >
> > Am I being too hopeful expecting all this lot to run on one server?  Nothing
> > I have seen in error or events give me a clue as to why it all stops.
>
>
>
> It is impossible to say what is causing the problem, (I don't know squat
> about your solution or the problem domain), but the most common cause for a
> suite of applications to behave like this, is a lockup over some common
> resource - two apps waiting for the other, some app waiting for another to
> finish, who's waiting for..., &etc.
>
> Draw out a collaboration diagram showing all your components/apps, the
> resources and messaging between them. Back up about 12,00 feet and see if it
> makes sense.
>
> Meanwhile, add some logging to your apps so you can determine where and why
> they are hanging.
>
> Don't look for something too exotic or for a mysterious feature of a server
> - it is something you doing to yourself. <g>
>
> hth
> -ralph
Author
21 Mar 2006 9:09 AM
Clive Summerfield
Database is Microsoft SQL Server, (2000).  For further information,
application 2 interrogates database to see if any processing is waiting.  If
there is a "batch of data", it farms the processing our through DCOM to a
processing software.  (This could be on another machine, but in this case it
is on server as well.)  This creates report in file format, and writes a
record to a table with a status agains the record of "Report Prepared". 
Application 3 looks for that status, does what it needs to in terms of moving
the report around the system, and then changes the status to "Application 3
complete" (for want of a better phrase).  Application 4 does the same, and
Application 5, if required (another flag on the record created at Application
2) creates the pdf.
Files and record sets are not held open for very long.

Show quoteHide quote
"DEZ" wrote:

> Your server is one thing but the database System  Global Area maybe
> another for latch contention when mutiple parsing in a table happens.
> In Oracle 9i you could alter the SGA dynamically by the command: alter
> database set SGA=(size depends on machine);
> What kind of DB are you using
>
>
>
> ralph wrote:
> > "Clive Summerfield" wrote:
> >
> > > I have ONE server with a SQL Server 2000 DB and the following applications
> > > running on it.  Application 1 loads data from a TCP/IP stream into the
> > > database.  Application 2 prepares an output file from the data.  Applications
> > > 3 and 4 moves the files about according to parameters in the database.
> > > Application 5 calls the Adobe distiller object in order to produce a pdf from
> > > the output file.  Application 6 monitors the database.  Applications 2,3,4,5,
> > > and 6 poll the database to see if there is anything for them to do.
> > >
> > > My problem is when Application 5 is running, sometimes it freezes, sometimes
> > > application 2 or application 4 freezes.
> > >
> > > Am I being too hopeful expecting all this lot to run on one server?  Nothing
> > > I have seen in error or events give me a clue as to why it all stops.
> >
> >
> >
> > It is impossible to say what is causing the problem, (I don't know squat
> > about your solution or the problem domain), but the most common cause for a
> > suite of applications to behave like this, is a lockup over some common
> > resource - two apps waiting for the other, some app waiting for another to
> > finish, who's waiting for..., &etc.
> >
> > Draw out a collaboration diagram showing all your components/apps, the
> > resources and messaging between them. Back up about 12,00 feet and see if it
> > makes sense.
> >
> > Meanwhile, add some logging to your apps so you can determine where and why
> > they are hanging.
> >
> > Don't look for something too exotic or for a mysterious feature of a server
> > - it is something you doing to yourself. <g>
> >
> > hth
> > -ralph
>
>
Author
21 Mar 2006 11:10 AM
Ralph
Show quote Hide quote
"Clive Summerfield" <CliveSummerfi***@discussions.microsoft.com> wrote in
message news:5E9B56F2-E3ED-4ED6-B01C-2A06EA1380FC@microsoft.com...
> Database is Microsoft SQL Server, (2000).  For further information,
> application 2 interrogates database to see if any processing is waiting.
If
> there is a "batch of data", it farms the processing our through DCOM to a
> processing software.  (This could be on another machine, but in this case
it
> is on server as well.)  This creates report in file format, and writes a
> record to a table with a status agains the record of "Report Prepared".
> Application 3 looks for that status, does what it needs to in terms of
moving
> the report around the system, and then changes the status to "Application
3
> complete" (for want of a better phrase).  Application 4 does the same, and
> Application 5, if required (another flag on the record created at
Application
> 2) creates the pdf.
> Files and record sets are not held open for very long.
>

<snipped>

There is your problem - you just painted a nice bull's-eye around the
'status' and its table. It is a ideal setup for a race condition and
failure. No database guarantees concurrency, only integrity.

I would dump the whole scheme and have each app in the suite respond instead
to the actual products, using FileNotification or COM+ (Messaging or MTS).
Relegate 'status' to a logging exercise for historical purposes.

-ralph