Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error "Too many open files" in pdflatex

Tags:

latex

pdflatex

When compiling a latex document with 15 or so packages and about five includes, pdflatex throws a "too many open files"-error. All includes are ended with \endinput. Any ideas what might cause the error?

The error seems to depend on how many packages are used (no surprise...); however, this is not the first time I use this many packages, while I've never encountered such an error before.

@axel_c: This is not about linux. As you may or may not know, LaTeX is also available on windows (which just happens to be what I'm using right now).

like image 430
Martijn Avatar asked Nov 11 '09 14:11

Martijn


3 Answers

Try inserting

\let\mypdfximage\pdfximage
\def\pdfximage{\immediate\mypdfximage}

before \documentclass.

See also these threads from the pdftex mailing list:

  • Error message: Too many open files.
  • Too many files open
like image 70
rcs Avatar answered Sep 19 '22 10:09

rcs


Type

ulimit -n

to get the maximum number of open files. To change it to e.g. 2048, type

ulimit -S -n 2048
like image 23
pfnuesel Avatar answered Sep 22 '22 10:09

pfnuesel


What is this command giving you:

$ ulimit -n

You might want to increase it by editing /etc/security/limits.conf file.

like image 24
Pablo Santa Cruz Avatar answered Sep 19 '22 10:09

Pablo Santa Cruz