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 

EWebBrokerException Maximum number of concurrent connections

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





PostPosted: Tue Feb 06, 2007 8:05 pm    Post subject: EWebBrokerException Maximum number of concurrent connections Reply with quote



Hi,

I use ISAPI on IIS6, after one day of running ISAPI on server I get message
EWebBrokerException Maximum number of concurrent connections exceeded
Any suggestion?

My ISAPI project file is below, I use Access database.

library pdfengine;

uses
WebBroker,
//IIS Added
ActiveX,
ComObj,
ISAPIThreadPool,
//*
ISAPIApp,
UMain in 'UMain.pas' {wm: TWebModule},
UHandler in 'UHandler.pas' {frmHandler},
SndMailThrd in 'SndMailThrd.pas',
MsMultipartParser in 'MsMultipartParser.pas',
abSMTPRoutines in 'abSMTPRoutines.pas',
MsMime in 'MsMIME.pas',
MD in 'MD.pas',
UWebCapture in 'UWebCapture.pas' {frmWebCapture};

{$R *.RES}

exports
GetExtensionVersion,
HttpExtensionProc,
TerminateExtension;

begin
//IIS Added
CoInitFlags := COINIT_MULTITHREADED;
//*
Application.Initialize;
Application.CreateForm(Twm, wm);
Application.Run;
end.


Regards,
Tomas
Back to top
news.borland.com
Guest





PostPosted: Wed Feb 07, 2007 12:38 pm    Post subject: Re: EWebBrokerException Maximum number of concurrent connect Reply with quote



ISAPIApp before ISAPIThreadpool

also make sure your streams are being freed and if you use IBX then use
unidirectional only.

close all client datasets in a finally clause.


"Tomas" <tomazaz (AT) gmail (DOT) com> wrote in message
news:45c88b21 (AT) newsgroups (DOT) borland.com...
Quote:
Hi,

I use ISAPI on IIS6, after one day of running ISAPI on server I get
message
EWebBrokerException Maximum number of concurrent connections exceeded
Any suggestion?

My ISAPI project file is below, I use Access database.

library pdfengine;

uses
WebBroker,
//IIS Added
ActiveX,
ComObj,
ISAPIThreadPool,
//*
ISAPIApp,
UMain in 'UMain.pas' {wm: TWebModule},
UHandler in 'UHandler.pas' {frmHandler},
SndMailThrd in 'SndMailThrd.pas',
MsMultipartParser in 'MsMultipartParser.pas',
abSMTPRoutines in 'abSMTPRoutines.pas',
MsMime in 'MsMIME.pas',
MD in 'MD.pas',
UWebCapture in 'UWebCapture.pas' {frmWebCapture};

{$R *.RES}

exports
GetExtensionVersion,
HttpExtensionProc,
TerminateExtension;

begin
//IIS Added
CoInitFlags := COINIT_MULTITHREADED;
//*
Application.Initialize;
Application.CreateForm(Twm, wm);
Application.Run;
end.


Regards,
Tomas
Back to top
Wilbert van Leijen
Guest





PostPosted: Wed Feb 07, 2007 4:09 pm    Post subject: Re: EWebBrokerException Maximum number of concurrent connect Reply with quote



Tomas wrote:
Quote:
Hi,

I use ISAPI on IIS6, after one day of running ISAPI on server I get message
EWebBrokerException Maximum number of concurrent connections exceeded
Any suggestion?

Increase MaxConnections!

See:

http://blogs.teamb.com/deepakshenoy/archive/2004/10/18/1612.aspx
Back to top
Tomas
Guest





PostPosted: Fri Feb 09, 2007 9:12 am    Post subject: Re: EWebBrokerException Maximum number of concurrent connect Reply with quote

"news.borland.com" <markhorrocks_at_yahoo_dot_com> wrote in message
news:45cac359 (AT) newsgroups (DOT) borland.com...
Quote:
ISAPIApp before ISAPIThreadpool

What is diference it makes?

Quote:
also make sure your streams are being freed and if you use IBX then use
unidirectional only.


Quote:
close all client datasets in a finally clause.
I close ADOConnection in OnDestroy event of main module. Is it right place

to close connection?
Back to top
Tomas
Guest





PostPosted: Fri Feb 09, 2007 3:26 pm    Post subject: Re: EWebBrokerException Maximum number of concurrent connect Reply with quote

Maybe you know how to free stream below? I send stream to user and
everyhting works fine except f.Free;
I get here Access Violation.


f := TFileStream.Create(AProcessFileNameResult, fmOpenRead and
fmShareDenyWrite);
try
Response.ContentStream := f;
Response.CustomHeaders.Values['Content-Disposition'] :=
Format('attachment; filename=%s',
[ExtractFileName(AProcessFileNameResult)]);
Response.ContentType :=
GetMimeTypeFromFile(ExtractFileName(AProcessFileNameResult));
Response.SendResponse;
Handled := True;
finally
f.Free;
end;
Back to top
Dennis Passmore
Guest





PostPosted: Fri Feb 09, 2007 9:03 pm    Post subject: Re: EWebBrokerException Maximum number of concurrent connect Reply with quote

Quote:
Response.ContentStream := f;
Response.SendResponse;
Handled := True;
finally
f.Free;
end;


When you passed F to the Response object it then owns the stream and has
already Free'd in SendResponse so
do not try to free it since it no longer exists.
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.