aldine.

Aldine / Overleaf compile timeout

Overleaf compile timeout: the limit on each plan and how to fix a timed-out compile

Overleaf's documentation gives the compile timeout as 10 seconds on the free plan and 240 seconds on premium plans. A timeout means the compile did not finish within that limit. Overleaf's own guide says timeouts "can often be fixed or prevented", and this page walks through those fixes before it gets to the other options. (Overleaf docs: plan limits, as of October 2026) (Overleaf docs: fixing and preventing compile timeouts, as of October 2026)

Written by the Aldine project, so read it with that in mind. Statements about other products are taken from the linked pages of that product's own documentation. Checked on 12 October 2026.

The compile timeout on each Overleaf plan

WhereCompile timeoutSource
overleaf.com, free plan10 secondsPlan limits
overleaf.com, premium plans (Standard, Pro, Student)240 secondsPlan limits
Self-hosted Overleaf (Community Edition and Server Pro)180 seconds by default, set with COMPILE_TIMEOUTOn-premises project management

Values as stated on the linked Overleaf pages on 12 October 2026. Overleaf can change them; the linked pages are authoritative.

The plans page does not give seconds. It lists a "Basic compile timeout" for the free plan and "24x Basic compile timeout" for the Student, Standard and Pro plans, which matches 10 and 240 seconds. (Overleaf: plans and pricing, as of October 2026)

The limit follows the project, not the person compiling. Overleaf describes compile time as a project-level feature that is "based on the project owner's subscription", so someone on the free plan who is invited to a project owned by a subscriber gets the longer limit in that project. (Overleaf docs: premium features, as of October 2026)

Why a compile times out

Overleaf builds your PDF with latexmk, and the timeout is the time allowed for that build. Overleaf's guide names these causes: (Overleaf docs: fixing and preventing compile timeouts, as of October 2026)

Fixes that work inside Overleaf

These are the steps from Overleaf's guide, in its order. (Overleaf docs: fixing and preventing compile timeouts, as of October 2026)

1. Find and fix errors with stop on first error

Open the menu next to the Recompile button and turn on Stop on first error. The compile then stops at the first error, shows the message, and produces no PDF. Fix each error until the project is clean. Overleaf recommends this mode "when errors are encountered, or if you encounter a compile timeout". (Overleaf docs: recompiling your project, as of October 2026)

2. Compile in Fast [draft] mode to test the images

Choose Fast [draft] from the same menu. Overleaf says this "replaces all of your graphics with boxes and makes the PDF compile much faster". If the document compiles in Fast [draft] mode and not in Normal mode, "the cause may be large or many image files". (Overleaf docs: fixing and preventing compile timeouts, as of October 2026)

3. Make the images cheaper to process

All three points are from Overleaf's timeout guide (as of October 2026).

4. Externalize TikZ and pgfplots drawings

The TikZ external library stores each drawing as a PDF, so LaTeX does not redraw it on every compile. On Overleaf, \tikzexternalize must be in the project's main .tex file, and the folder named in prefix has to exist and contain at least one file before TikZ can write to it. (Overleaf docs: reducing the compile time for diagrams, as of October 2026)

\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize[prefix=tikz/]

If the first compile with externalization itself times out, Overleaf lists three workarounds: build incrementally by commenting out parts of the project, compile once on your own computer and upload the generated files from the tikz folder, or keep the drawings in a separate project (with the standalone or preview package) and include the resulting PDF page by page with \includegraphics[page=1]{tikzpics.pdf}. (Overleaf docs: reducing the compile time for diagrams, as of October 2026)

5. Check the known slow packages and fatal errors

Overleaf's guide lists specific cases. The ones that are quick to check: (Overleaf docs: fixing and preventing compile timeouts, as of October 2026)

6. If it compiled before and now does not

Use Recompile from scratch to clear outdated generated files, then look at your recent changes in the History panel. If the project came from your own computer or is a copy of an older project, set the project's TeX Live version to the one that last compiled it, because new projects and copies use the latest version by default. (Overleaf docs: fixing and preventing compile timeouts, as of October 2026)

Two standard LaTeX techniques for long documents

These are features of LaTeX itself, so they work in Overleaf and anywhere else.

Compile one chapter at a time with \includeonly

If the document pulls in its chapters with \include, a line such as \includeonly{chapters/results} in the preamble makes LaTeX read only the listed files. The LaTeX reference manual notes that the auxiliary information of the omitted files "is still there", so page numbers and cross references to the skipped chapters keep working from their last full compile. (LaTeX2e reference manual: \include and \includeonly, as of October 2026)

\includeonly{chapters/results}

\begin{document}
\include{chapters/intro}
\include{chapters/results}
\include{chapters/discussion}
\end{document}

Remove the \includeonly line for the final build.

Skip image processing with the draft option of graphicx

\usepackage[draft]{graphicx} does in the source what a draft compile mode does in the editor. In the reference manual's words, each graphic "is not shown but instead its file name is printed in a box of the correct size". The final option is the default and switches it back. (LaTeX2e reference manual: graphics package options, as of October 2026)

When the document needs more time than the plan gives

Some documents are simply long or heavy. Overleaf says so itself: large or complex documents "may require the extended compile time that is available on our paid plans", and "some projects may even need a longer compile time than is available on our paid plans. In those cases, you may need to download your project and compile it locally." (Overleaf docs: fixing and preventing compile timeouts, as of October 2026) The options, with what each costs you:

How Aldine handles the compile timeout

Aldine is an open-source, self-hosted collaborative LaTeX editor. It also has a compile timeout, because a runaway compile should not hold a server forever. The difference is that the person running the server sets it.

With docker-compose.full.yml, which builds the images from source, put the value in .env:

COMPILE_TIMEOUT_MS=300000

With the default docker-compose.yml, which runs the prebuilt images, add the variable to the compiler service, for example in a docker-compose.override.yml next to it:

services:
  compiler:
    environment:
      COMPILE_TIMEOUT_MS: "300000"

Then run docker compose up -d. The configuration table in deploy/README.md lists every variable.

Three things to keep in proportion. A longer timeout does not fix an error or an infinite loop; it only makes you wait longer for the same failure, so the fixes above still apply. Aldine's default of 120 seconds is shorter than the 240 seconds of Overleaf's premium plans until you raise it. And Aldine is self-hosted only: you need a server, it is at v0.x, and it has no keystroke-level track changes. The list is in the self-hosting guide, and the install steps are on self-hosting Aldine with Docker Compose.

Try the live demo View source on GitHub

No account, no install. The demo is a shared sandbox and resets every night.

Common questions

What is the Overleaf compile timeout?

Overleaf's plan limits page gives 10 seconds on the free plan and 240 seconds on premium plans. (Overleaf docs: plan limits, as of October 2026)

What is the compile time limit on the Overleaf free plan?

10 seconds. The plans page calls this the "Basic compile timeout" and lists the paid plans at 24 times that. (Overleaf docs: plan limits, as of October 2026) (Overleaf: plans and pricing, as of October 2026)

Can I get a longer compile timeout without paying?

On overleaf.com the longer limit is a premium feature, but it is tied to the project: if the project owner has a subscription, collaborators on the free plan get the longer limit in that project. (Overleaf docs: premium features, as of October 2026) Otherwise you can reduce the compile time with the fixes above, or compile the downloaded source on your own computer.

Why does my Overleaf project time out when it compiled before?

Overleaf's guide says a small change can cause it. It suggests Recompile from scratch, checking recent changes in History, and turning on Stop on first error to find an error introduced by accident. (Overleaf docs: fixing and preventing compile timeouts, as of October 2026)

Does Fast [draft] mode fix a timeout?

It tells you whether images are the cause. Fast [draft] replaces graphics with boxes; if the document compiles that way and not in Normal mode, large or many image files are the likely reason. Overleaf also notes that some large projects compile in two stages, first in Fast [draft] mode and then in Normal mode. (Overleaf docs: fixing and preventing compile timeouts, as of October 2026)

What is the compile timeout on a self-hosted Overleaf?

180 seconds by default. You change it with the COMPILE_TIMEOUT environment variable, in seconds, in config/variables.env. (Overleaf docs: on-premises project management, as of October 2026)

What is the compile timeout in Aldine?

120 seconds by default. The person running the server changes it with COMPILE_TIMEOUT_MS on the compiler container, in milliseconds.