crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

[BUG] Request timed out us.i.posthog.com Max retries exceeded with url: /batch/

Open Rhuax opened this issue 1 year ago • 1 comments

Description

I'm instantiating a simple Agent, a simple Task and calling the crew.kickoff(). My crew has memory=True and verbose=True. I'm noticing these kind of logs:

ERROR:root:Error during short_term save: Request timed out.
INFO:backoff:Backing off send_request(...) for 2.3s (requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='us.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f7c9f0d2800>, 'Connection to us.i.posthog.com timed out. (connect timeout=15)')))
ERROR:root:Error during entities save: Request timed out.
ERROR:backoff:Giving up send_request(...) after 4 tries (requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='us.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f7c94dfe650>, 'Connection to us.i.posthog.com timed out. (connect timeout=15)')))
ERROR:root:Error during entities save: Request timed out.

I set the OTEL_SDK_DISABLED environment variable to "true". Is CrewAI somehow sending stuff on posthog.com? My machine is airgapped, so that's why I think I'm having that problem. But I want to understand how to disable this other log.

Steps to Reproduce

  1. Instantiate a simple Agent in an airgapped machine

Expected behavior

No usage sending to any other provider as default behaviour.

Screenshots/Code snippets

from crewai import Agent, Task, Crew
agent2 = Agent(
    role="An helpful chatbot",
    goal="Chat with users",
    backstory="An helpful chatbot",
    verbose=True,
    llm="anthropic.claude-3-5-sonnet-20240620-v1:0"
)

task1 = Task(
    expected_output="helpful responses",
    description="Reply to all users questions",
    agent=agent2,
    human_input=True
)

my_crew = Crew(agents=[agent2], tasks=[task1],memory=True,verbose=True)

Operating System

Ubuntu 22.04

Python Version

3.10

crewAI Version

0.76.9

crewAI Tools Version

0.13.4

Virtual Environment

Venv

Evidence

INFO:backoff:Backing off send_request(...) for 2.3s (requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='us.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f7c9f0d2800>, 'Connection to us.i.posthog.com timed out. (connect timeout=15)')))
ERROR:root:Error during entities save: Request timed out.
ERROR:backoff:Giving up send_request(...) after 4 tries (requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='us.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f7c94dfe650>, 'Connection to us.i.posthog.com timed out. (connect timeout=15)')))
ERROR:root:Error during entities save: Request timed out.```

### Possible Solution

.

### Additional context

.

Rhuax avatar Nov 07 '24 14:11 Rhuax

Yeah I'm getting the same. Rarely, connections are successful, but the error is more common.

ERROR: Giving up send_request(...) after 4 tries (requests.exceptions.ConnectionError: HTTPSConnectionPool(host='us.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at<>>: Failed to establish a new connection: [Errno 111] Connection refused'))

thragusjr avatar Dec 02 '24 01:12 thragusjr

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jan 01 '25 12:01 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Jan 06 '25 12:01 github-actions[bot]

I had the same problem. It seems that this is not from crewAI's telemetry directly, but some of the dependencies also do their own telemetry. I found ChromaDB and embedchain using the posthog package for telemetry. The issue goes away when I set these envvars:

OTEL_SDK_DISABLED=true  # for crewAI
MEM0_TELEMETRY=false  # for embedchain
ANONYMIZED_TELEMETRY=False  # for chromaDB

jugoetz avatar Feb 17 '25 15:02 jugoetz

But not working. I have tried the above solution.

2025-05-07 12:29:13,746 - 5692 - _common.py-_common:120 - ERROR: Giving up send_request(...) after 4 tries (requests.exceptions.SSLError: HTTPSConnectionPool(host='us.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1010)'))))

Krishnamugundh avatar May 07 '25 06:05 Krishnamugundh