Showing first {{hits.length}} results of {{hits_total}} for {{searchQueryText}}{{hits.length}} results for {{searchQueryText}}

A ‘compile timeout’ means that it took too long to make the PDF for your document. This page explains why this can happen and how to fix it.

Contents

Large, High-resolution images

If you have several high-resolution PNG or JPEG images in your document, LaTeX has to resize them every time we compile the PDF, and this can take a long time. Here are some ways to get around this:

  • Use PDF files instead of PNG files for diagrams and plots. If your drawing or plotting software exports to PDF, that will be much faster (and the output will look better). Also converting PNG files to PDF and using those instead of the PNGs will speed things up.
  • Use draft mode when working online, by clicking on the downward-pointing arrow next to the "Recompile" button, and then choose the "Fast (draft)" option.

    This replaces all of your graphics with boxes and makes the PDF compile much faster.

  • Use lower resolution images for the online version of the document.

Complicated TikZ or pgfplots drawings

TikZ and pgfplots produce great graphics, but they can take a long time to compile. There are several ways you can externalize the TikZ pictures so that LaTeX doesn't have to redraw them from scratch every time it makes a new PDF.

mhchem

Recent versions of the mhchem package can take longer to compile.

biblatex

The current version of biblatex on Overleaf is v3.7, which can be very slow especially if you're using styles that need to track occurrences of citations, e.g. authoryear-comp, authoryear-icomp, APA etc. It may help to try switching to a non-tracking style while compiling online, e.g. authoryear, or (where possible) use BibTeX instead.

(When we upgrade to a newer version of TeX Live, a newer version of biblatex will also be installed, which should run much faster with most styles.)

Infinite loops

LaTeX can fall into an infinite loop when it tries to make the PDF—no matter how long you wait, it will never finish. Infinite loops are most commonly caused by bugs in packages or in user-defined commands, e.g. when a command expands to itself (a process called recursion).

Tracing/debugging calls

If you happen to have a \tracingall in your document (perhaps leftover from a template or a project from a local machine), it'll be recording lots and lots of lines in the .log file (which can quickly grow to hundreds of MBs) and showing no sign of stopping. Remove the \tracingall call from your Overleaf project; or use the trace package instead, if you need to debug online.

Fair Use limits

If you have a very large document, it may just take a long time to compile. We offer longer compile times on our paid plans:

  Free Student, Collaborator, Pro
Timeout 1 minute 4 minutes

We have to set timeouts in order to deal with infinite loops, and also to ensure that we are fair to all of our users.

Still stuck?

If you have a compile timeout error that you cannot resolve, please let us know and we'll take a look for you.

[edit] Overleaf guides

[edit] LaTeX Basics

[edit] Mathematics

[edit] Figures and tables

[edit] References and Citations

[edit] Languages

[edit] Document structure

[edit] Formatting

[edit] Fonts

[edit] Presentations

[edit] Commands

[edit] Field specific

[edit] Class files