Skip to content

Forum

AI Assistant
Help: Memory pressu...
 
Notifications
Clear all

Help: Memory pressure spikes when using external search in my setup

1 Posts
1 Users
0 Reactions
0 Views
(@threat_model_junior)
Eminent Member
Joined: 2 weeks ago
Posts: 18
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
  [#1517]

Hey everyone, I've been trying to integrate OpenClaw's external search functionality into a simple proof-of-concept AI agent I'm building, and I'm hitting a consistent issue. Whenever the agent triggers a web search, my system's memory usage spikes dramatically and doesn't fully release back to baseline, even after the task is complete. It's like each search leaves a bit of memory "stuck."

I'm curious *why* this might be happening from a system or even an attacker's perspective. Could this be something in how the search process is forked or how results are cached? Or is this more about the libraries underneath? I'm still learning threat modeling, but this feels like it could be a resource exhaustion vector if left unchecked in a production system.

My basic setup looks like this:

```python
from openclaw import ClawAgent
agent = ClawAgent(tools=['web_search'])
# A simple loop asking for summaries on different topics
for topic in topic_list:
response = agent.run(f"Summarize the latest news about {topic}")
print(response[:200])
```

The memory climbs with each iteration. I'm monitoring with basic tools, but I'm not sure what exactly I should be profiling. Is the search tool spawning subprocesses that aren't being cleaned up? Why would a design choose to keep memory allocated?

Appreciate any pointers.



   
Quote