Re: does the apache adaptor have a hard coded limit on number of apps?

Patrick Middleton <[email protected]> Thu, 16 Dec 2004 12:17:25 +0000
Newsgroups gmane.comp.web.webobjects.admin
Message-ID <[email protected]>
>> You can increase the limit by increasing WA_MAX_APP_COUNT in
>> /Developer/Examples/WebObjects/Source/Adaptors/Adaptor/config.h and
>> recompiling the adapter.
>
> Ok, I did this.  Still, when I add the 16th app it gives "the requested
> application was not found on this server."
>
> So I try the 5.2 adapter.  Same error, so
>
>> In addition, Wonder has an updated version of
>> the 5.1 adaptor with an increased 64 instance limit, in binary form:
>>
>> <http://wonder.sourceforge.net/WOAdaptor.html>
>
> I download this and try this adaptor from Project Wonder.  Same error.
> The 16th app gives the error that it cannot be found...

Well huh.

There's an idiot risk of altering the value in the .h file and 
rebuilding, but there are no makefile dependencies or something so the 
.c files using the header don't get recompiled, and 'gnumake clean ; 
gnumake install' would make this go away.  But nobody's going to get 
caught like that, not two or even three times, not when if you have to 
alter the header at all from a newly-downloaded tarball, you do it 
before your first compile.  I decided to do some research.

I decided to go to circa 40 apps -- one instance each of the half-dozen 
or so my usual ones, except for one -- the same binary configured as 
name, name1, ... name32, and one instance of each.  Being lazy, rather 
than add them in Monitor, I shut down apache, wotaskd etc, patched the 
config files with output generated from 'awk' (to ensure that the 
instance of name%d had port number 2100+i, sequence number 20+i, etc).  
And when I restarted, 'ps' and the WOAdaptorInfo page and everything 
showed my 33 single-instance apps running.  Having created 
/tmp/logWebObjects as root before restarting apache, I could see 
/tmp/WebObjects.log listing the apps and instances as having been 
added.  I played around with host-list-based and file-based 
configuration in the webobjects adaptor conf file as loaded by apache 
via /etc/httpd/httpd.conf ; that didn't seem to affect anything.  
Clicking on a link from the WOAdaptorInfo page got me the single 
instance of the app I was expecting.  Everything works; even clicking 
the 'wotaskd' link in the "Hosts" page in Monitor -- what came back 
showed name, name1, ... name32.

However, Monitor resolutely refused to show any app after 'name'. I've 
configured the same app under two different names before and it's 
worked.  And the app instances where left running even after Monitor 
removed them and pushed its changes to wotaskd.

I've then changed the names to namename, name1name, ... , name32name.  
Still didn't work properly.  /tmp/logWebObjects and /tmp/WebObjects.log 
showed me gems like
> Info: ac_finishedModifyingConfig(): name16name has no instances. 
> Removing from config.
> Info: ac_finishedModifyingConfig(): removing name16name:37 (2117)
and
> 2004-12-16 11:54:41.737 wotaskd[1010] Exceeded license request limit - 
> request processing temporarily stalled. [requestWindow = 60 seconds; 
> requestLimit = 50]. This message appears only once.

Never once did I see a 'The requested application was not found on this 
server'.  I did see lots of 'no instance available' for Monitor, and one 
of the page requests for Monitor triggered the 'Exceeded license request 
limit' message; I'm using a WO451 dev license.  No evidence for a 
hardcoded limit of 16 apps; lots of evidence that slow instance 
responses to wotaskd's lifebeat requests, and obscure bugs in Monitor, 
and using a dev license may cause things to break.

If I really had to deploy a large number of apps/instances on a single 
server, I would be inclined to got through httpd.conf very carefully, to 
identify a directive like
> Include /System/Library/WebObjects/Adaptors/Apache/apache.conf
to ensure I was loading the mod_WebObjects.so I thought I was, to move 
away from host-list configuration, and to stay well away from Monitor.

-- Patrick