1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[GH-ISSUE #999] [Bug Report (BETA)]: Obico Timeout is too restrictive for Bambuddy #697

Closed
opened 2026-05-07 00:12:54 +02:00 by BreizhHardware · 1 comment

Originally created by @fblix on GitHub (Apr 16, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/999

Originally assigned to: @maziggy on GitHub.

Opening up a new issue since the old one was closed: #172

Hey y'all back with another issue.

It seems Bambuddy takes too long to take snapshot. I get this error msg after a while:

[2026-04-16 06:29:55,717] ERROR in server: Failed to get image ImmutableMultiDict([('img', 'http://10.0.4.138:8000/api/v1/printers/1/camera/snapshot?token=MYTOKEN')]) - HTTPConnectionPool(host='BAMBUDDY-IP', port=8000): Read timed out. (read timeout=5)

Upon testing it takes my bambuddy instance roughly 10s to reply to a CURL on the snapshot endpoint.

The timeout seems to be hardcoded in the server.py of obico. I have overwritten the timeout value (just for testing) for my container. the yaml looks like this now:


  obico-ml-api:
    container_name: obico-ml-api
    build:
      context: https://github.com/TheSpaghettiDetective/obico-server.git#release:ml_api
    environment:
      - DEBUG=True
      - FLASK_APP=server.py
    command: bash -c "sed -i 's/timeout = (0.1, 5)/timeout = (5, 30)/' server.py && gunicorn --bind 0.0.0.0:3333 --workers 1 --timeout 120 wsgi"
    ports:
      - "3333:3333"
    restart: unless-stopped
    healthcheck:
      test: ["CMD-SHELL", "curl -f http://localhost:3333/hc/ || exit 1"]
      start_period: 30s
      interval: 30s
      timeout: 10s
      retries: 3

Originally posted by @fblix in #172

I am on the latest daily build.

Originally created by @fblix on GitHub (Apr 16, 2026). Original GitHub issue: https://github.com/maziggy/bambuddy/issues/999 Originally assigned to: @maziggy on GitHub. Opening up a new issue since the old one was closed: #172 > Hey y'all back with another issue. > > It seems Bambuddy takes too long to take snapshot. I get this error msg after a while: > > > ` > [2026-04-16 06:29:55,717] ERROR in server: Failed to get image ImmutableMultiDict([('img', 'http://10.0.4.138:8000/api/v1/printers/1/camera/snapshot?token=MYTOKEN')]) - HTTPConnectionPool(host='BAMBUDDY-IP', port=8000): Read timed out. (read timeout=5) > ` > > Upon testing it takes my bambuddy instance roughly 10s to reply to a CURL on the snapshot endpoint. > > The timeout seems to be hardcoded in the [server.py](https://[raw.githubusercontent.com/TheSpaghettiDetective/obico-server/release/ml_api/server.py](https://raw.githubusercontent.com/TheSpaghettiDetective/obico-server/release/ml_api/server.py)) of obico. I have overwritten the timeout value (just for testing) for my container. the yaml looks like this now: > ```yaml > > obico-ml-api: > container_name: obico-ml-api > build: > context: https://github.com/TheSpaghettiDetective/obico-server.git#release:ml_api > environment: > - DEBUG=True > - FLASK_APP=server.py > command: bash -c "sed -i 's/timeout = (0.1, 5)/timeout = (5, 30)/' server.py && gunicorn --bind 0.0.0.0:3333 --workers 1 --timeout 120 wsgi" > ports: > - "3333:3333" > restart: unless-stopped > healthcheck: > test: ["CMD-SHELL", "curl -f http://localhost:3333/hc/ || exit 1"] > start_period: 30s > interval: 30s > timeout: 10s > retries: 3 > > ``` > _Originally posted by @fblix in [#172](https://github.com/maziggy/bambuddy/issues/172#issuecomment-4258051073)_ I am on the latest daily build.
BreizhHardware 2026-05-07 00:12:54 +02:00
  • closed this issue
  • added the
    duplicate
    label
Author
Owner

@maziggy commented on GitHub (Apr 16, 2026):

https://github.com/maziggy/bambuddy/issues/172#issuecomment-4258051073

<!-- gh-comment-id:4258788219 --> @maziggy commented on GitHub (Apr 16, 2026): https://github.com/maziggy/bambuddy/issues/172#issuecomment-4258051073
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy-maziggy-1#697
No description provided.