Skip to content
Snippets Groups Projects
Commit 531b3f6c authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Use m-config.h to get number of FD's. Add some comments.

parent f5229260
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
* to recompile the entire server. * to recompile the entire server.
*/ */
static char *rcsid = "$Id: server-config.c,v 0.8 1991/08/28 02:36:37 ceder Exp $"; #include <config.h>
#include <m-config.h>
static char *rcsid = "$Id: server-config.c,v 0.9 1991/08/30 01:32:18 ceder Exp $";
...@@ -84,17 +87,25 @@ const int CACHE_TEXT_STATS = 10; ...@@ -84,17 +87,25 @@ const int CACHE_TEXT_STATS = 10;
/* /*
* MAX_NO_OF_CONNECTIONS must be small enough. Each connection takes one * MAX_NO_OF_CONNECTIONS must be small enough. Each connection takes one
* file descriptor, and it is important that there are a few descriptors * file descriptor, and it is important that there are a few descriptors
* left so that it is possible to save the data base. lyskomd will crash * left so that it is possible to save the data base. lyskomd might crash
* if this number is too big and that many connectionattempts are made * if this number is too big and that many connectionattempts are made
* simultaneously. * simultaneously.
*
* The following descriptors are open by LysKOM:
* stdin, stdout, stderr (stdin and stdout could probably be closed.
* The log() function prints to stderr.)
* TEXTFILE_NAME (always open)
* DATAFILE_NAME (often open)
* STATISTIC_NAME (open after a SIGUSR1)
* Thus, the max number of connections is the number of available file
* descriptors minus six. This has not been fully tested for a long
* while, so we subtract eight just to be on the safe side. That still
* gives 56 simultaneous users on a sun4, and that is enough for the
* time beeing. (If you need more connections you can ran a mux. Send
* mail to kom@lysator.liu.se for more info.)
*/ */
#ifdef __sequent__
const int MAX_NO_OF_CONNECTIONS = 12;
#else
const int MAX_NO_OF_CONNECTIONS = 50; /* the maximum number of persons
* that can use Kom simultaneously */
#endif
const int MAX_NO_OF_CONNECTIONS = (MAX_OPEN_FD - 8);
const int MARK_AS_READ_CHUNK = 128; /* You can't mark more than this many const int MARK_AS_READ_CHUNK = 128; /* You can't mark more than this many
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment