crewAIInc / crewAI

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
https://crewai.com
MIT License
21.89k stars 3.04k forks source link

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

Open Rhuax opened 3 weeks ago

Rhuax commented 3 weeks ago

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

.
thragusjr commented 8 hours ago

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'))