Kbase 12843: Sequent; too many files open; errno 24 ( 98 ); How to fix
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
Sequent; too many files open; errno 24 ( 98 ); How to fix
This notebook entry describes an issue for Sequent machines running
PROGRESS releases prior to 6.3. It also addresses this same issue
for those with release 6.3 or greater. The fix is different
depending on the version of PROGRESS involved.
With a multi-volume database, PROSTRUCT ADD might generate a "too many
files open" error. For Release 6.3+, you can workaround this issue
by using the Maximum Files (-Mv) startup parameter on the PROSTRCT
command. Prior to 6.3, use the following workaround. It sets
the LLIMIT and ULIMIT programmatically since the -Mv parameter is
not an option in these releases of PROGRESS.
Type in, compile, link and run the following C program:
/* morefiles.c */
#define LLIMIT 20 /* SEQUENT MACHINE */
#define ULIMIT 100
#include <stdio.h>
#include <math.h>
main(argc, argv)
int argc;
char *argv[];
{
if (argc < 3)
usage();
if (!((atoi(argv[1]) > LLIMIT) && (atoi (argv[1]) <= ULIMIT)))
{
fprintf(stderr, "New openfile limit range error (%d-%d).\n",
LLIMIT, ULIMIT);
usage();
}
if (setdtablesize(atoi(argv[1])) != atoi(argv[1]))
{
fprintf(stderr, "Unable to set table size to %s.\n", argv[1]);
usage();
}
if (execvp(argv[2], &argv[2]) == -1)
fprintf(stderr, "Unable to exec %s.\n", argv[2]);
}
usage()
{
fprintf(stderr, "\n Usage: maxopenfile #limit file_to_exec\n");
fprintf(stderr, " #limit = new maximum file descriptor limit\n");
fprintf(stderr, " file_to_exec = usually set to /bin/sh\n");
exit(0);
}
To compile and link the above piece of code, type:
cc -o morefiles morefiles.c -lseq
You need to include the library /usr/lib/libseq.a on the compile
line to avoid errors in linking.
When running the program, use the following syntax:
morefiles nn file_to_exec
where nn is the number of additional file descriptors and
'file_to_exec' is normally /bin/sh.
To apply the increase in file descriptors to your prostrct
command, run prostrct like this:
morefiles 30 prostrct add ... (rest of command)
Progress Software Technical Support Note # 12843