Re: max number of onfiguration servers
Kenji Nakamura <[email protected]> Tue, 28 Sep 2004 12:55:10 +0900
| Newsgroups | gmane.comp.web.webobjects.admin |
|---|---|
| Message-ID | <[email protected]> |
Mark
Thank you for your information.
As far as I cheked by now, the souce code you mentioned has a workaroud
for WA_MAX_APP_COUNT, which is related to the applications set via the
Monitor. WA_MAX_CONFIG_SERVERS is related to the configulation servers
written in WebObjects.conf with the directive "WebObjectsConfig"
including both WWW and application servers.
When the Adaptor fails to alocate shmem, it writes the follwing message
to WebObjects.log:
Info: WOShmem_alloc(): allocated region "application list" (868 x 16)
Info: WOShmem_alloc(): allocated region "instance list" (144 x 2048)
Info: WOShmem_alloc(): allocated region "configTimes" (20 x 1)
Error: WOShmem_alloc(): not enough shared memory to allocate region
"configServers" (12416 x 1)
Also, WA_MAX_CONFIG_SERVERS is used in appcfg.c, especially in the
function readServerConfig() as below:
net_fd netfdList[WA_MAX_CONFIG_SERVERS];
.....
for (i=0; i < WA_MAX_CONFIG_SERVERS; i++) {
netfdList[i] = 0;
if (configServers[i].host[0]) {
s = _contactServer(&configServers[i]);
if(s)
netfdList[i] = s;
}
}
where the Adaptor makes the array of net_fd with WA_MAX_CONFIG_SERVERS
elements, and tries to contact the severs only for WA_MAX_CONFIG_SERVERS
times.
Now, I'm sure I should increse the number of WA_MAX_CONFIG_SERVERS to
use more than 16 configulation servers, and also keep more shmem for
addtional servers, but not sure that's enough.
>On 26-Sep-04, at 10:01 PM, Kenji Nakamura wrote:
>> I cound't find any discussion on WA_MAX_CONFIG_SERVERS or the max
>> number
>> of onfiguration servers on the WEB (or I might just overlooked), then I
>> wonder if there would be some simple solution for this.
>>
>> Is there anybody who suffered from the same kind of problem and/or give
>> me any suggesiton, please?
>
>Kenji,
>
>You should check out project Wonder: http://wonder.sourceforge.net/
>Among other things, they have a version of the 5.1 WOAdaptor which
>has been modified as you requested. However, in a quick glance, they
>don't seem to have made any changes to config.c so it would seem that
>they didn't encounter the same problems with memory allocation.
>
>I'm not sure if this will help, but it's a place to start.
>Good luck!
>Mark.
>__
>Mark Ritchie, [email protected] 416-843-5479
>Software Developer, Apple Certified Developer Trainer
>WebObjects, Cocoa, Mac OS X and Mac OS X Server
>Diamond Lake Consulting Inc., Toronto, Ontario, Canada