Caves Travel Diving Graphics Mizar Texts Cuisine Lemkov Contact Map RSS Polski
Trybiks' Dive Texts Intraweb Intraweb and MaxConnections YAC Software
  Back

List

Charsets

Charts

DBExpress

Delphi

HTML

Intraweb

MSTest

PHP

Programming

R

Rhino Mocks

Software

Testing

UI Testing

VB.NET

VCL

WPF

Intraweb and MaxConnections
Ok, I have an Apache DSO module written using Delphi and Intraweb. Every once in a while, the application was running out of connections and was reporting the following error:
  Internal Server Error 500
  Exception: EWebBrokerException
  Message: Maximum number of concurrent connections exceeded. Please try again later.
Unfortunately, the information that I could find on the web wasn't very helpful - setting Application.MaxConnections to some value isn't really an option when there's no Application object defined...

However, the following solution works well enough for me - add this code to you project's .dpr file (set MaxConnections to whatever suits you):
  uses
    ...
    WebReq;
  ...
  begin
    if WebReq.WebRequestHandler <> NIL then
      WebReq.WebRequestHandler.MaxConnections := 255;
    ...
  end.
HTH

Top

Comments
#1
shanbaum wrote on 2011-04-23 18:41:00
Do you not have either ApacheApp, ApacheTwoApp, or Apache22App declared in your project's Uses clause? If you do, each of those contains an Application variable descending from TWebApplication (which descends from TWebRequestHandler); so there is an Application.MaxConnections.

If you don't have any of those units in Uses, I'm curious as to how your DSO is structured and how it works - I'd like to know more!
#2
Trybik wrote on 2011-05-06 07:09:54
Thanks.

I have ApacheTwoApp in the uses clause, but that doesn't declare the Application variable. WebBroker has that (at least in D2007, I don't have any of the later versions to check there). And I never needed WebBroker included in my uses clause before... ;-)

Top

Add a comment (fields with an asterisk are required)
Name / nick *
Mail (will remain hidden) *
Your website
Comment (no tags) *
Enter the text displayed below *
 

Top

Tags

Intraweb

Delphi


Related pages

Delphi interfaces... again

Checking "Dangling" Event Handlers in Delphi Forms

Drag-n-drop files onto the application window

A Case for FreeAndNIL

Intraweb as an Apache DSO module

"Device not supported" in Intraweb

Automated GUI Testing

Rounding and precision on the 8087 FPU

SessionTimeout in Intraweb

Using TChart with Intraweb

Unknown driver: MySQL

TIdMessage's CharSet

Software Guarantees

Automated Testing of Window Forms

TChart - Missing Labels in Axes

Memory Leaks and Connection Explosions in DBExpress

Controlling Conditional Defines and Compilation Switches

Detecting Memory Leaks with DUnit

last_insert_id() and DBExpress

Registering Extensions

DBExpress and Thread Safety

Forms as Frames

Checking Dangling Pointers vs. the New Memory Manager

</form> ... <form>

Accessing Protected Members

Objects, interfaces, and memory management in Delphi