I am trying to compile a TeX file, but after a long time I got this message:

l.3593 ...temp.png}

If you really absolutely need more capacity,
you can ask a wizard to enlarge me.

Here is how much of TeX's memory you used:
 31937 strings out of 94500
 1176767 string characters out of 1176767
 272586 words of memory out of 1000000
 24170 multiletter control sequences out of 10000+50000
 11185 words of font info for 39 fonts, out of 500000 for 2000
 580 hyphenation exceptions out of 1000
 28i,7n,36p,345b,3810s stack positions out of 1500i,500n,5000p,200000b,5000s
PDF statistics:
 33619 PDF objects out of 300000
 7356 named destinations out of 131072
 48094 words of extra memory for PDF output out of 65536
!  ==> Fatal error occurred, the output PDF file is not finished!

Perhaps my file is huge (like 4000 pages) and this is the reason for this.


4 Answers 4


Put into your local TeX configuration file, which is for TeXLive in .../texlive/2011/texmf.cnf, for example,

pool_size = 3250000

Then run sudo fmtutil-sys --all. For MiKTeX it should be possible to change such values from within the MiKTeX configuration GUI.

If you do not find the file run

kpsewhich texmf.cnf

it shows the location.

  • For Linux/Ubuntu, texlive directory and textmf.cnf file are usually located under /usr/share/. Jul 19, 2017 at 17:55
  • fmtutil-sys --all takes forever to run. Jan 26, 2022 at 22:40
  • Is it possible to change this on the command line so that it only affects the document in question and not all documents?
    – Eric
    Sep 23, 2023 at 22:44

Another solution is to use LuaLaTeX.

Use luatex it dynamically allocates memory so you are limited by the physical memory available

(from: How to avoid exceeding TeX capacity when using multi-page tables? )

But just watch the memory usage. While the old TeX engine had hardcoded, fixed-length limits, LuaTeX will use as much memory as it needs.


You have several possibilities if you use TeXLive (with MikTeX see Werner's link at the question comment).

1) A simple but "bad" method: you can modify the original texmf.cnf. This file is here:


(2011 for me but it's the same with 2010) BUT If you modify this original file, YOUR CHANGES WILL BE LOST when it is updated.

What can you modify?

The values below are used for the pgf manual (see /doc/generic/pgf/tex-en/texmf.cnf)

main_memory = 9000000       % words
extra_mem_top = 6000000     % extra high memory for chars, tokens, etc.
extra_mem_bot = 6000000     % extra low memory for boxes, glue, breakpoints,

% Extra space for the hash table of control sequences (which allows 10K
% names as distributed).
hash_extra = 200000

% Max number of characters in all strings, including all error messages,
% help texts, font names, control sequences.  These values apply to TeX and MP.
pool_size = 3850000

2) Better, instead of modifying the original file, put your changes, and only your changes, in ../../texmf.cnf. That is, if this file is installed in:


add your custom settings to


For example, MacTeX adds in the file /usr/local/texlive/2011/texmf.cnf:

TEXMFHOME = ~/Library/texmf
TEXMFVAR = ~/Library/texlive/2011/texmf-var
TEXMFCONFIG = ~/Library/texlive/2011/texmf-config

Important : include only your changed values, not a copy of the whole thing!

3) Another possibility is to use another file. This is described in the section 6 Memory and Speed Considerations of the pgfplots package, but you can use a variant like the one used for the pgfmanual if you know how to use a MakeFile

It employs a 'texmf.cnf' which lies in ../../text-en. dist: FORCE

export TEXMFCNF="../../text-en:$(TEXMFCNF)"; This is interesting to see how you can compile the pgfmanual. This documentation needs a lot of memory to be compiled

  • 1
    main_memory should be less than 8,000,000 total. See the comment in the texmf.cnf. Apr 22, 2013 at 19:11
  • @Bugbusters Thanks ! do you know why ? Apr 22, 2013 at 20:00
  • I don't know. :-) Apr 22, 2013 at 20:03

You should split your document into smaller parts or recompile the TeX package to increase the available space. You have exhausted the available string characters.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .