[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: objectclass attribute

At 11:15 AM 4/10/00 +0200, Mikael Grehn wrote:
>"Kurt D. Zeilenga" wrote:
>> >Request of comments on some other work that I'm doing:
>> >I am about to insert code to limit the number of clients logged in
>> >simulateously by counting the number of new threads
>> >(one for each new client) that tries to log on.
>> The number of threads is not equal to the number of clients.
>> If you want to restrict the number of clients, restrict the
>> number of connections.
>I read my max number of clients and set dbtsize to this limit. So the connections
>array doesnt contain more than dbtsize structs, this should do the work...just as
>you mentioned.
>No I have another max constants read from registry that checks the current number
>of threads and refuses any new threads if this limit has been exceeded.

Be very careful reducing sizes of variables such as the descriptor
table size.  OpenLDAP doesn't deal with resource exhaustion as well
as it should.

>> >The value is read from
>> >registry when initializing daemon.
>> >I have also included code to shutdown OpenLDAP from a remote program using
>> >the currentthreadID.
>> Okay, but I don't see the need for such a program.
>Could be needed if you wish to monitor and control slapd from another (interface
>based) application, like an administration tool.

We write a PID file.  That should be sufficient for another tool
to locate slapd.

>> >The main url-listener thread is concidered the main thread and when it is
>> >initialized it saves its thread id in registry.
>> Problem is, of course, you could have multiple slapd running on a given
>> box.
>I deny this option by setting global event when starting slapd, so no more slapds
>can start. :)

I don't believe is little reason to deny this option.

>But there is one mayor problem, when I shutdown slapd (either with ExitProcess or
>just clicking x-button on console) an exception sometimes occur.

Provide a stack back trace.

>This means that
>slapd doesnt shutdown in a normal way, dll:s are not notified about shutdown and
>events and registry are not notified. I tried to debug why slapd gave exception
>("memory at 0x....... could not be read") but ít was kinda hard to locate. Any
>known bugs about this?

Not that I'm aware of... then again, I don't run slapd on NT.