orca icon indicating copy to clipboard operation
orca copied to clipboard

Intermittent / internet related? 'Uncaught ReferenceError: Plotly is not defined'

Open tbarchyn opened this issue 4 years ago • 1 comments

Running orca in a docker container - version 1.3.1. We are seeing intermittent problems with the orca server not producing images, and requests from plotly timing out. When this happens orca is completely broken and cannot be fixed until the container is restarted.

The docker logs show the following error:

{"severity":"ERROR","textPayload":"renderer error - Uncaught ReferenceError: Plotly is not defined"}

On the other end, in plotly, we get a 522 socket timeout error - from reviewing the plotly code, this suggests the request went in to the orca server, but nothing came back.

OSError: 522: client socket timeout

The system works the vast majority of the time - only rare instances does it fail. These failures possibly relate to poor internet and do occur repeatedly in the same location (with poor internet). Orca works flawlessly with no internet at all, and flawlessly with good internet.

Possibly related to #232 - however, the containers work most of the time - it is only rare situations do we see these failures.

  • During boot of the docker container does orca request a version of plotly.js from the internet and possibly times out?

  • #232 suggests using a local copy of plotly.js - but how to configure orca to use local version within the docker container?

The container was built with the following docker-compose entry:

orca:
    image: quay.io/plotly/orca
    ports:
      - "9091:9091"
    healthcheck:
      test: ["CMD", "curl", "--fail", "http://localhost:9091"]
      interval: 60s
      timeout: 5s
      retries: 2
    restart: always
    network_mode: "host"
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"

For reference, networking seems to be all good. The server is responding to network requests, networking seems to be working, logs show a steady stream of json parse errors from health checks. Same occurs when hitting localhost:9091 in the browser.

{"severity":"ERROR","textPayload":"422 - json parse error","labels":{}}

Thank you for any advice!

tbarchyn avatar Jul 14 '21 20:07 tbarchyn

I'm sorry not to have any great answer to your specific question, but in general we are recommending that folks switch from using Orca to using Kaleido, which is our new and much-less-finicky static-image export system. More info at https://medium.com/plotly/introducing-kaleido-b03c4b7b1d81

nicolaskruchten avatar Jul 16 '21 13:07 nicolaskruchten