[DUG] DataSnap/Midas App Server Error

Jason Saggers jsaggers at esp.co.nz
Fri Sep 2 10:49:17 NZST 2005


There was an IP based logged system that was posted about, about 3-4
months ago in the thread.  Cant remeber who it was, but it may do what
you want....
 
Jason

  _____  

From: Stacey Verner [mailto:stacey at cjntech.co.nz] 
Sent: Friday, 2 September 2005 10:41 a.m.
To: NZ Borland Developers Group - Delphi List
Subject: RE: [DUG] DataSnap/Midas App Server Error


I had considered logging before but decided not to because the volume
would be severly large, but as you suggest, I can tweak the logging to
just record intersting stuff.
Another problem I had was that the the logging has to be thread-safe and
non blocking. Any tips there?
 
Stacey
 
  _____  

From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz]
On Behalf Of Dave Jollie
Sent: Friday, 2 September 2005 10:24
To: NZ Borland Developers Group - Delphi List
Subject: RE: [DUG] DataSnap/Midas App Server Error



	You could create a logging class. In each important procedure on
the server's RDM, create a logging instance at the beginning of the
procedure. Wrap the procedure in a try finally, freeing the logging
object at the end of the procedure. Within the try..finally, have a
try...except, catching any exception and feeding it to the logging
object. The logging object records to file, the start and end times of
the procedure, any exceptions, etc. In this way you'll find procedures
that are bottlenecks, procedures that throw exceptions, and any that
never return, for whatever reason.

	 

	To reduce the volume of your log file, on freeing of the logging
object, you could do some tests - if no exceptions were recorded in the
procedure and it didn't take too long to execute, then don't write any
info to file - only write to file for exceptions or very long times.
However, then you'd miss any procedure which never returns. For this
you'd need to log a procedure name and time stamp on create of the
logging object.

	 

	You could have an app server switch to turn logging on and off,
so that it's not going all the time, but only when indicated from the
app server GUI.

	 

	This may help you find something...

	 

	Dave

	 

	
  _____  


	From: delphi-bounces at ns3.123.co.nz
[mailto:delphi-bounces at ns3.123.co.nz] On Behalf Of Stacey Verner
	Sent: Friday, 2 September 2005 9:48 a.m.
	To: NZ Borland Developers Group - Delphi List
	Subject: [DUG] DataSnap/Midas App Server Error

	 

	We have an DataSnap/Midas app server which fails randomly.

	 

	We can't make it happen no matter how hard we try, but it
happens fairly regularly on our production machine.

	 

	A little bit of info on the app and app server:

	*	The applicaiton is a normal database application. 
	*	The application also needs to get information from a
settings (metadata) database such as: 

		*	Which databases they have access to 
		*	What permissions they have on the database etc 

	*	Instead of connecting directly to the settings database
we use the app server which shares one database connection between all
clients. 

		*	This means that there is one database connection
for each application instead of 2 which reduces licencing costs 

	*	We use the borland socket server and a socket connection
to connect to the app server. 

		*	When we used a normal DCOM connection each
client got its own copy of the app server, so the settings database
connection is not shared and in effect each application had two
connections to the database. 

	Sometimes the app server locks up and the clients can't connect.

	 

	We have a work around that will try app servers on other
machines if this fails which works OK, but if it never gets a connection
the all sorts of odd things happen.

	 

	Firstly, does anyone have any thoughts on this. Debug ideas etc?

	Secondly, when the connection to the app server fails it takes
forever (minutes) to return no matter what I set the socket connection
timeout to.

	 

	Thanks

	 

	Stacey

	 

	Stacey Verner             Ph:   +64-9-4154790
	Software Developer        Fax:  +64-9-4154791
	                          DDI:  +64-9-4154797
	CJN Technologies Ltd.     Email: stacey at cjntech.co.nz
<mailto:stacey at cjntech.co.nz> 
	PO Box 302-278, North Harbour, Auckland 1330, New Zealand
	12 Piermark Drive, North Harbour, Auckland, New Zealand
	Visit our website at http://www.cjntech.co.nz/
<http://www.cjntech.co.nz/>  

	 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns3.123.co.nz/pipermail/delphi/attachments/20050902/56a9d554/attachment-0001.html


More information about the Delphi mailing list