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

slapd quits under heavy load



I'm having a problem where slapd decides to shut itself down under
heavy load. I've traced the problem to this section of code in
daemon.c.

		switch(ns = SLAP_EVENT_WAIT(tvp)) {
		case -1: {	/* failure - try again */
				int err = sock_errno();

				if( err == EBADF
#ifdef WSAENOTSOCK
					/* you'd think this would be EBADF */
					|| err == WSAENOTSOCK
#endif
				) {
					if (++ebadf < SLAPD_EBADF_LIMIT)
						continue;
				}

				if( err != EINTR ) {
					Debug( LDAP_DEBUG_CONNS,
						"daemon: select failed (%d): %s\n",
						err, sock_errstr(err), 0 );
					slapd_shutdown = 2;
				}
			}
			continue;

SLAPD_EBADF_LIMIT is defined as 16.

My question is, why was 16 chosen for this value? Is there any reason
for us to either increase this limit or remove this section
alltogether? We would like to get to the point where slapd doesn't
silently stop running.

Herb