Skip to content
\n

i am testing word files covert to pdfs, all word files are in Chinese with 100+pages, and this problem occurs very frequently.

\n

this is my .env file:

\n
# base\nAPI_TIMEOUT=3600s\n# libreoffice\nLIBREOFFICE_MAX_QUEUE_SIZE=1\nLIBREOFFICE_RESTART_AFTER=1\nLIBREOFFICE_AUTO_START=true\nLIBREOFFICE_START_TIMEOUT=60s\n
\n

this is my docker compose file:

\n
version: '3.8'\n\nservices:\n    gotenberg1:\n        image: gotenberg/gotenberg:8.23.1\n        container_name: gotenberg-instance-1\n        environment:\n            - TZ=Asia/Shanghai\n        ports:\n            - \"8094:3000\"\n        volumes:\n            - ./fonts:/usr/local/share/fonts\n        env_file:\n            - .env\n        restart: unless-stopped
\n

I set API_TIMEOUT=60s or 600s or 3600s , they are all can't complete the task normally, is my settings wrong?

\n

use docker stats see the cpus is using 103%, memory using 240M, and after each task ends abnormally, the CPU usage remains at 100%+, I dont know why? i am in China, if some package url timeout ?

\n

and i search google says mount fonts to docker, but problems remain.
\nand i set Load Balancin , but problems remain.

\n

Thinks!

","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"

I try to solve the problem all day, and I found some clues, those word files are all in Chinese, documents written by different people on different computers, has may different fonts, I build a new docker image with my windows fonts and other debain apt depends, and resolved a batch of document issues, But there are still many documents that have problems.
\nand i think this is a an effective way, like this Dockerfile to build a new gotenberg docker image.

\n
FROM gotenberg/gotenberg:8.23.1\n\nUSER root\n\nCOPY ./fonts/* /usr/local/share/fonts/\n\nRUN apt-get update && apt-get install -y  \\\n    fonts-noto-core \\\n    fonts-noto-cjk \\\n    fonts-noto-color-emoji \\\n    fonts-liberation \\\n    fonts-wqy-zenhei \\\n    fonts-arphic-gbsn00lp \\\n    fonts-wqy-microhei \\\n    fonts-arphic-gkai00mp \\\n    ttf-wqy-zenhei \\\n    fonts-symbola \\\n    fontconfig \\\n    libgl1 \\\n && apt-get clean \\\n && rm -rf /var/lib/apt/lists/*\n\nRUN fc-cache -f -v\n\n# USER gotenberg\n
","upvoteCount":0,"url":"https://github.com/gotenberg/gotenberg/discussions/1335#discussioncomment-14464177"}}}
Discussion options

You must be logged in to vote

I try to solve the problem all day, and I found some clues, those word files are all in Chinese, documents written by different people on different computers, has may different fonts, I build a new docker image with my windows fonts and other debain apt depends, and resolved a batch of document issues, But there are still many documents that have problems.
and i think this is a an effective way, like this Dockerfile to build a new gotenberg docker image.

FROM gotenberg/gotenberg:8.23.1

USER root

COPY ./fonts/* /usr/local/share/fonts/

RUN apt-get update && apt-get install -y  \
    fonts-noto-core \
    fonts-noto-cjk \
    fonts-noto-color-emoji \
    fonts-liberation \
    fonts-wqy-z…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@finch-xu
Comment options

Answer selected by finch-xu
@finch-xu
Comment options

@gulien
Comment options

@finch-xu
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants