The short answer
When Odoo prints a PDF, it calls itself back to fetch the report's CSS, fonts and images. In multi-worker mode, that call needs a second free worker. If every worker is busy printing, each one waits for a worker that never comes free. Odoo freezes for everyone until it kills those workers, about two minutes later.
There are two fixes. Add more workers, so a free one is always left. Or point report.url at Odoo's gevent process, which can serve those calls while every worker is busy. The second fix removes the deadlock for good.
What you see
- Someone clicks Print and the spinner keeps turning.
- Other users see Odoo stop loading at the same time, even if they aren't printing.
- After about two minutes, the print fails, or the PDF comes back with no layout: no logo, no fonts, the text squashed into one column.
- Your Odoo log shows lines like this:
ERROR ? odoo.service.server: WorkerHTTP (12345) timeout after 120s
It often happens at the busiest moment of the day. Month-end invoicing, a batch of delivery slips, or three people at the counter printing receipts at once.
Why it happens
With workers set above 0, Odoo runs a fixed number of HTTP worker processes. Each one handles one request at a time.
A PDF print works like this:
- A worker gets the print request. It builds the report as HTML.
- It hands the HTML to wkhtmltopdf and waits.
- wkhtmltopdf opens the HTML and loads the CSS, fonts and images it links to. It loads them from Odoo, over HTTP, at the address in the
report.urlsystem parameter. If that isn't set, it usesweb.base.url. - Those HTTP requests need a worker too.
So one print needs two workers: one that waits, and one that serves the files. Now say you have 3 workers and 3 people print at the same moment. All 3 workers are waiting for wkhtmltopdf. wkhtmltopdf is waiting for a worker. Nothing moves.
Odoo has a time limit on each request, limit_time_real, which is 120 seconds by default. When it runs out, Odoo kills the stuck workers and starts new ones. That is the "timeout after 120s" in your log, and it is why the freeze lasts about two minutes.
Scheduled actions that send invoices by email print PDFs too. They don't use an HTTP worker for the print itself, but their wkhtmltopdf calls still need one. So a big batch of emailed invoices adds to the queue.
If you run Odoo with workers = 0 (one process with threads), this doesn't happen. That mode serves requests at the same time. It is also too slow for a team in production, so most setups that hit this problem shouldn't go back to it.
Check that this is your problem
Look for worker timeouts in the log:
grep -E "WorkerHTTP .* timeout after" /var/log/odoo/odoo-server.log
On Docker:
docker logs your-odoo-container 2>&1 | grep -E "WorkerHTTP .* timeout after"
Then check how many workers you have:
grep -E "^\s*(workers|gevent_port|dbfilter)\s*=" /etc/odoo/odoo.conf
If the timeouts line up with times people were printing, and your worker count is low (2 to 4 is common), this is very likely the cause.
Fix 1: add more workers
Keep more workers than the number of PDFs people print at the same moment, with room left for everyone else using Odoo. If three people can print at once and five more are working in Odoo, 3 workers is not enough.
[options] workers = 6
Restart Odoo after the change.
This works, but it has limits. Each worker uses memory, so your server's RAM caps how many you can run. Our guide on how many Odoo workers you need shows how to work it out. And it only moves the line. On a busy day, enough prints at once still lock it up.
Fix 2: send wkhtmltopdf to the gevent process
In multi-worker mode, Odoo also starts a gevent process on gevent_port (8072 by default). Most people know it as the websocket port for live chat and notifications. But it serves the whole Odoo app, and it can handle many requests at the same time. If wkhtmltopdf fetches its files from there, it never waits for an HTTP worker. The deadlock can't happen.
Step 1: check that gevent answers
The gevent process only runs when workers is above 0. On the server, or inside the Odoo container:
curl -s -o /dev/null -w "%{http_code} %{redirect_url}\n" http://127.0.0.1:8072/web/login
You want 200 and nothing after it. If the connection is refused, check that workers is above 0 and that gevent_port is not set to something else. On Odoo 15 and older, the option is called longpolling_port.
Step 2: make sure Odoo picks your database from that address
wkhtmltopdf will call 127.0.0.1, not your domain. If your dbfilter uses %d or %h, Odoo picks the database from the domain name, and 127.0.0.1 matches none. The PDF then comes out with no layout.
If the test in step 1 redirected to /web/database/selector, or returned an error, this is why. With one database per Odoo, set the filter to the database name:
[options] dbfilter = ^yourdb$
Restart Odoo and run the test in step 1 again.
If one Odoo serves several databases chosen by domain, this fix doesn't fit as it is. Use fix 1 for that setup.
Step 3: set report.url
In Odoo, turn on developer mode. Go to Settings, then Technical, then System Parameters. Create a new one:
- Key:
report.url - Value:
http://127.0.0.1:8072
Or from the command line:
odoo shell -c /etc/odoo/odoo.conf -d yourdb <<'EOF'
env['ir.config_parameter'].set_param('report.url', 'http://127.0.0.1:8072')
env.cr.commit()
EOF
Odoo uses report.url only to fetch files while it prints. Links inside your PDFs, like the link to an invoice in the customer portal, still use your real domain.
Step 4: test it
Print one invoice. It should look exactly as before, with your logo and fonts.
Then try to break it. Open as many browser tabs as you have workers, and print a PDF in each one at the same moment. Before the fix, this froze Odoo for two minutes. After it, every PDF comes back.
If a PDF now comes out with no layout, go back to step 2. Odoo couldn't find your database from 127.0.0.1.
Which fix should you use?
Both. Fix 2 removes the deadlock. Fix 1 still decides how fast Odoo feels when many people use it, because each print holds one worker while it waits. With fix 2 in place, too few workers means slow printing, not a frozen Odoo.
Keep step 2 in mind when you copy production to staging, or restore a backup to a new database name. The dbfilter and report.url have to match the new setup, or printing breaks on the copy.
How Skysize handles this
On Skysize, this is set for you. Every Odoo with more than one worker prints through the gevent process, and the setting is checked again after each deploy, restore and staging copy. Printing can't lock up your Odoo, and you don't have to remember any of the steps above.
It works the same on our managed Odoo hosting, on your own server and inside your own network, for Community and Enterprise.
Skysize is built by ex-Odoo engineers and is ISO 27001 certified.
Try it with your own database on the 7-day free trial. No card needed.
Talk to an Odoo hosting expert
FAQ
Why does Odoo freeze when several people print at once? Each PDF print holds one worker and needs a second one to serve its CSS, fonts and images. When every worker is printing, none is free to serve those files, so they all wait until Odoo kills them after 120 seconds.
Why does my Odoo PDF come out without styles or a logo? wkhtmltopdf couldn't load the report's CSS and images from Odoo. Either no worker was free to serve them, or the address in report.url (or web.base.url) doesn't reach your database. Check both.
What is report.url in Odoo? A system parameter that tells Odoo where wkhtmltopdf should fetch report files from. If it isn't set, Odoo uses web.base.url. Odoo uses it for nothing else.
What port does Odoo's gevent process use? 8072 by default, set with gevent_port (longpolling_port on Odoo 15 and older). It only runs when workers is above 0.
Should I just raise limit_time_real? No. A longer limit makes the freeze last longer. The workers are waiting for each other, not working slowly.