overleaf icon indicating copy to clipboard operation
overleaf copied to clipboard

Cant compile an especific project

Open alsantiagoabreu opened this issue 4 years ago • 8 comments

Hello everybody.

You deployed the project and I could compile some projects without problems, however an especific project I cant compile, and Overleaf sends me a error message "Server Error Sorry, something went wrong and your project could not be compiled. Please try again in a few moments.". In nginx logs I found the following: 2021/08/18 14:55:17 [error] 965#965: *8417 upstream prematurely closed connection while reading response header from upstream, client: ip.ip.ip.ip, server: _, request: "POST /project/61158332dd487f00a20a79e1/compile HTTP/1.1", upstream: "http://127.0.0.1:3000/project/61158332dd487f00a20a79e1/compile", host: "overleaf.my.domain", referrer: "http://overleaf.my.domain/project/61158332dd487f00a20a79e1"

In nginx.conf I incressed worker_processes and worker_connections, and in sharelatex.conf I incressed proxy_read_timeout and proxy_send_timeout but I havo no success..

Can anyone help me please ?

alsantiagoabreu avatar Aug 18 '21 19:08 alsantiagoabreu

A update: inside the container I found the output.pdf and it is correct! IDK why it isn't appearng in the overleaf screen

alsantiagoabreu avatar Aug 19 '21 14:08 alsantiagoabreu

I got very similar errors. The output.pdf was created correctly but the UI still ran continuously without showing any PDF. The project was very big with 250 pages and the PDF size was 8.6MB. Other smaller projects worked well. Because there was no error in the logs, I could not debug. Is there any way to enable the logging of errors?

ducalpha avatar Aug 27 '21 05:08 ducalpha

Hello @jdleesmiller @mserranom I have same issue with 2.0.1 The first compile it's broken , if we reload more time after kill to broken process it's work From the first test, we have output.pdf Thanks

wixaw avatar Sep 22 '21 11:09 wixaw

Hello Same issue with 2.7.1 :/

wixaw avatar Sep 24 '21 14:09 wixaw

Thanks, we'd need more information to reproduce, including:

  • application configuration
  • document causing the issue
  • logs, if possible

mserranom avatar Oct 01 '21 10:10 mserranom

One of the projects that blocks (there are many per day) : These_Domi_Version_soutenance (1).zip

version: '2.2'
services:
    sharelatex:
        restart: always
        # Info : https://hub.docker.com/r/sharelatex/sharelatex/tags?page=1&ordering=last_updated
        # Releases notes : https://github.com/overleaf/overleaf/wiki/Release-Notes-2.0
        # Attention pour la v2.5.0 on passe en mongo 4 !
        image: sharelatex/sharelatex:2.7.1
        container_name: sharelatex
        depends_on:
            mongo:
                condition: service_healthy
            redis:
                condition: service_started
        privileged: true
        ports:
            - 5000:80
        links:
            - mongo
            - redis
        volumes:
            - /usr/local/data-sharelatex/data-prod/:/var/lib/sharelatex
            - /usr/local/data-sharelatex/logs-prod/:/var/log/sharelatex:rw
            - /var/run/docker.sock:/var/run/docker.sock
            - /local/texlive/:/usr/local/texlive/
        environment:

            SHARELATEX_APP_NAME: Overleaf domain (ShareLaTeX)

            SHARELATEX_MONGO_URL: mongodb://mongo/sharelatex

            # Same property, unfortunately with different names in
            # different locations
            SHARELATEX_REDIS_HOST: redis
            REDIS_HOST: redis

            ENABLED_LINKED_FILE_TYPES: 'url,project_file'

            # Enables Thumbnail generation using ImageMagick
            ENABLE_CONVERSIONS: 'true'

            # Disables email confirmation requirement
            #EMAIL_CONFIRMATION_DISABLED: 'true'

            # temporary fix for LuaLaTex compiles
            # see https://github.com/overleaf/overleaf/issues/695
            TEXMFVAR: /var/lib/sharelatex/tmp/texmf-var

            ## Set for SSL via nginx-proxy
            #VIRTUAL_HOST: 103.112.212.22

            SHARELATEX_SITE_URL: https://sharelatex.domain.fr
            SHARELATEX_NAV_TITLE: DomainLaTex
            SHARELATEX_HEADER_IMAGE_URL: https://www.domain.fr/favicons/android-chrome-192x192.png
            SHARELATEX_ADMIN_EMAIL: "<->. Go xxxxx"

            SHARELATEX_LEFT_FOOTER: '[ {"text":"Service LaTex proposé par l''domain"}]'
            SHARELATEX_HEADER_EXTRAS: '[ {"text":"L''offre de services","url":"http://xxxx","only_when_logged_out":true},{"text":"Assistance domain","url":"xxxxxxx/"}]'

            SHARELATEX_RIGHT_FOOTER: '[{"text": ""} ]'

            SHARELATEX_EMAIL_FROM_ADDRESS: "[email protected]"

            # SHARELATEX_EMAIL_AWS_SES_ACCESS_KEY_ID:
            # SHARELATEX_EMAIL_AWS_SES_SECRET_KEY:

            SHARELATEX_EMAIL_SMTP_HOST: mail.domain.fr
            SHARELATEX_EMAIL_SMTP_PORT: 25
            # SHARELATEX_EMAIL_SMTP_SECURE: false
            # SHARELATEX_EMAIL_SMTP_USER:
            # SHARELATEX_EMAIL_SMTP_PASS:
            # SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH: true
            # SHARELATEX_EMAIL_SMTP_IGNORE_TLS: false
            # SHARELATEX_CUSTOM_EMAIL_FOOTER: "<div>This system is run by department x </div>"

            SHARELATEX_ALLOW_PUBLIC_ACCESS: 'true'
            SHARELATEX_ALLOW_ANONYMOUS_READ_AND_WRITE_SHARING: 'true'

            ################
            ## Server Pro ##
            ################

            # SANDBOXED_COMPILES: 'true'

            # SANDBOXED_COMPILES_SIBLING_CONTAINERS: 'true'
            # SANDBOXED_COMPILES_HOST_DIR: '/var/sharelatex_data/data/compiles'
            # SYNCTEX_BIN_HOST_PATH: '/var/sharelatex_data/bin/synctex'

            # DOCKER_RUNNER: 'false'

            ## Works with test LDAP server shown at bottom of docker compose
            # SHARELATEX_LDAP_URL: 'ldap://ldap:389'
            # SHARELATEX_LDAP_SEARCH_BASE: 'ou=people,dc=planetexpress,dc=com'
            # SHARELATEX_LDAP_SEARCH_FILTER: '(uid={{username}})'
            # SHARELATEX_LDAP_BIND_DN: 'cn=admin,dc=planetexpress,dc=com'
            # SHARELATEX_LDAP_BIND_CREDENTIALS: 'GoodNewsEveryone'
            # SHARELATEX_LDAP_EMAIL_ATT: 'mail'
            # SHARELATEX_LDAP_NAME_ATT: 'cn'
            # SHARELATEX_LDAP_LAST_NAME_ATT: 'sn'
            # SHARELATEX_LDAP_UPDATE_USER_DETAILS_ON_LOGIN: 'true'

            # SHARELATEX_TEMPLATES_USER_ID: "578773160210479700917ee5"
            # SHARELATEX_NEW_PROJECT_TEMPLATE_LINKS: '[ {"name":"All Templates","url":"/templates/all"}]'


            # SHARELATEX_PROXY_LEARN: "true"

    mongo:
        restart: always
        image: mongo:4.0
        container_name: mongo
        volumes:
            - /local/mongo:/data/db
            - /local/sharelatex/scripts/core:/local/sharelatex/scripts/core
        healthcheck:
            test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet
            interval: 10s
            timeout: 10s
            retries: 5

    redis:
        restart: always
        image: redis:5
        container_name: redis
        expose:
            - 6379
        volumes:
            - /local/redis:/data

In to container, i dont have error in nginx

output.log agg.log

Thank you for your investigation

wixaw avatar Oct 01 '21 12:10 wixaw

Hello @mserranom
Have you been able to try to reproduce my problem?

wixaw avatar Jan 03 '22 15:01 wixaw

Same problem here. After clicking "Recompile" button, the error message "Server Error Sorry, something went wrong and your project could not be compiled. Please try again in a few moments." comes up - no log files, no pdf. At the same times, in the nginx-logs, the message "upstream timed out (110: Connection timed out) while reading response header from upstream" appears. At the moment, we have only one project which triggers this (this project uses quite an amount of Tikz/PGF plotting of ASCII-files). What is interesting is that apparently the corresponding xelatex-job is still going on while the webfrontend already throws the "server error" message. So there might be indeed some timeouts involved.

Does anyone have some ideas what could go wrong here and how to fix the problem? The original poster already tried to tweak the nginx.conf, but without success.

smueller48 avatar Nov 15 '22 14:11 smueller48

We've upgraded TeXLive a few times since this ticket was opened and there have been multiple major version upgrades for Server CE and our commercial Server Pro offering.

The reproducer project from https://github.com/overleaf/overleaf/issues/946#issuecomment-932184671 compiles fine in TeXLive full 2024 and the latest Server Pro 5.3.1 release.

das7pad avatar Feb 13 '25 23:02 das7pad