BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ISAPI thread question.

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Isapi-WebBroker
View previous topic :: View next topic  
Author Message
falhawk@gmail.com
Guest





PostPosted: Tue Jul 19, 2005 1:07 pm    Post subject: ISAPI thread question. Reply with quote



I've written an ISAPI web service which essentially is middleware
between a client application and 3rd party APIs. I receive XML, munge
it, change some stuff, and send XML to the 3rd party. I parse the
response and send it back to the original client. It is a pretty
complicated application.

I had noticed that some parts of it were taking too long to complete so
I've added threading in a few areas to help expedite certain processes.
At most I have the application fire off 6 threads at one time.
However I'm running into some problems with this. I'm using indy SSL
and TIdTCPClient to establish communications with the 3rd party APIs.
Sometimes however it just doesn't seem to create the TIdTCPClient for
all of the threads. Sometimes two will work, sometimes as many as five
will. I've localized the actual communication function to each thread
so I know it is threadsafe. Each thread creates and destroys the
TIdTCPClient as needed. The odd part is that I have the whole creation
step in a try/except but nothing is being thrown. Not until I try to
access the object do I get an error.

I tried running the application with only 3 threads being fired off at
a time. This seems to work a lot better, but still has some reliablity
issues. I still consider myself to be a delphi novice so I'm trying to
figure out what I'm missing. I was wondering if the overall thread
count was getting too high. When I look at DLLHost in task manager it
shows 16 threads even before it gets to the threaded part in my
application. I can't figure out why my one isapi DLL creates that many
threads (even in my single threaded version). I realize that ISAPI
dll's are mutlithreaded by nature, thats why I wrote it as such. I
also noticed that two instances of DLLHost appear when I first load the
dll.

I'm sort of banging my head against the wall with this. I can't seem
to find anything in groups or websites which could help fix it so I
hope maybe one of you can lead me to the path of enlightenment.

I appreciate any help that I may get.

Thanks!

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Isapi-WebBroker All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.