[GH-ISSUE #3168] [BUG]: Possible EventEmitter memory leak detected #2036

Open
opened 2026-02-22 18:27:51 -05:00 by yindo · 2 comments
Owner

Originally created by @Lasse-holr on GitHub (Feb 10, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3168

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

When using the “Bulk Link Scraper” to scrape big sites (281 html files running on localhost), the message “fetch failed” appears after about 4 minutes and the following log statement is printed to the collector log.

Error in collector log:
{"level":"error","message":"(node:2064) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added to [ParentPort]. Use emitter.setMaxListeners() to increase limit\n(Use AnythingLLM --trace-warnings ... to show where the warning was created)","service":"collector"}

Need to set the max listeners higher.
It will also be needed to increase the Depth to more than 5.
It may also help if it is possible to limit the Bulk Link Scraper to only scrape links from the same domain (localhost or computer name).

Are there known steps to reproduce?

Export a site for example a confluence space, copy the exported html files to a local Apache server.

Add the following configuration to the httpd.conf file.
KeepAliveTimeout 1800
Timeout 1800
FileETag None

Deactivate mod_cache

CacheDisable /

Sett Cache-Control header

Header set Cache-Control "no-cache, no-store, must-revalidate"

Deactivate Last-Modified header

Header unset Last-Modified
Originally created by @Lasse-holr on GitHub (Feb 10, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3168 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? When using the “Bulk Link Scraper” to scrape big sites (281 html files running on localhost), the message “fetch failed” appears after about 4 minutes and the following log statement is printed to the collector log. Error in collector log: {"level":"error","message":"(node:2064) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added to [ParentPort]. Use emitter.setMaxListeners() to increase limit\n(Use `AnythingLLM --trace-warnings ...` to show where the warning was created)","service":"collector"} Need to set the max listeners higher. It will also be needed to increase the Depth to more than 5. It may also help if it is possible to limit the Bulk Link Scraper to only scrape links from the same domain (localhost or computer name). ### Are there known steps to reproduce? Export a site for example a confluence space, copy the exported html files to a local Apache server. Add the following configuration to the httpd.conf file. KeepAliveTimeout 1800 Timeout 1800 FileETag None # Deactivate mod_cache <IfModule mod_cache.c> CacheDisable / </IfModule> # Sett Cache-Control header <IfModule mod_headers.c> Header set Cache-Control "no-cache, no-store, must-revalidate" </IfModule> # Deactivate Last-Modified header <IfModule mod_headers.c> Header unset Last-Modified </IfModule>
yindo added the possible bug label 2026-02-22 18:27:51 -05:00
Author
Owner

@severfire commented on GitHub (Feb 19, 2025):

I have issue with scraping as well unfortunately :-( Its broken on Docker version

@severfire commented on GitHub (Feb 19, 2025): I have issue with scraping as well unfortunately :-( Its broken on Docker version
Author
Owner

@timothycarambat commented on GitHub (Feb 19, 2025):

I have issue with scraping as well unfortunately :-( Its broken on Docker version

It isn't broken in docker. This error has nothing to do with that. If you omit --cap-add SYS_ADMIN on your docker command that it why
https://docs.anythingllm.com/installation-docker/local-docker#recommend-way-to-run-dockerized-anythingllm

@timothycarambat commented on GitHub (Feb 19, 2025): > I have issue with scraping as well unfortunately :-( Its broken on Docker version It isn't broken in docker. This error has nothing to do with that. If you omit `--cap-add SYS_ADMIN` on your docker command that it why https://docs.anythingllm.com/installation-docker/local-docker#recommend-way-to-run-dockerized-anythingllm
yindo changed title from [BUG]: Possible EventEmitter memory leak detected to [GH-ISSUE #3168] [BUG]: Possible EventEmitter memory leak detected 2026-06-05 14:44:09 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2036