run-llama / llama_index

LlamaIndex is a data framework for your LLM applications
https://docs.llamaindex.ai
MIT License
36.78k stars 5.27k forks source link

[Bug]: Docs crashing chrome tabs #15536

Open qqaatw opened 2 months ago

qqaatw commented 2 months ago

Bug Description

LlamaIndex docs keep crashing chrome tabs as follows:

image

When a tab of Llamaindex crashes, the other pages that open Llamaindex docs crash as well.

Tabs not opening Llamaindex docs remain intact.

Version

stable docs

Steps to Reproduce

Don't have a consistent way to reproduce it. It happens kinda randomly.

Chrome's version: Version 127.0.6533.120 (Official Build) (arm64) The docs pages that I opened (Included but not limited to): https://docs.llamaindex.ai/en/stable/examples/customization/prompts/chat_prompts/ https://docs.llamaindex.ai/en/stable/module_guides/loading/documents_and_nodes/usage_documents/ https://docs.llamaindex.ai/en/stable/api_reference/indices/document_summary/ https://docs.llamaindex.ai/en/stable/module_guides/workflow/#working-with-global-contextstate https://docs.llamaindex.ai/en/stable/examples/workflow/function_calling_agent/

Relevant Logs/Tracbacks

Please let me know if I could do something to help you debug.
dosubot[bot] commented 2 months ago

The LlamaIndex docs might be crashing Chrome tabs due to certain JavaScript files or CSS causing memory leaks or excessive resource usage. Specifically, the extra_javascript section includes javascript/mendablesearch.js, which could be a potential culprit.

To resolve this issue, you can try the following steps:

  1. Disable the JavaScript File: Temporarily remove or comment out the extra_javascript entry in your mkdocs.yml file to see if the issue persists.

    extra_javascript:
      # - javascript/mendablesearch.js
  2. Check for Updates: Ensure that all included JavaScript and CSS files are up-to-date and compatible with the latest version of Chrome.

  3. Debug the JavaScript: Use Chrome's Developer Tools to identify any potential issues or errors in the JavaScript execution.

  4. Optimize Resources: Ensure that the included resources are optimized and not causing excessive memory usage.

By following these steps, you should be able to identify and resolve the issue causing the Chrome tabs to crash [1].

To continue talking to Dosu, mention @dosu.

logan-markewich commented 2 months ago

Pretty sure this is due to the search bar building the search index client side locally

If your laptop/computer/phone is lacking RAM, it could crash

Been meaning to disable search and possibly replace with algolia, but it hasn't been as widespread to motivate that change yet

qqaatw commented 2 months ago

FWIW, I'm using an M1 mac with 64GB unified memory, so I would assume that the indexing is memory hungry. I do not run into this issue with other websites at least lately.

cgjosephlee commented 2 months ago

截圖 2024-08-22 上午10 49 56 Every single tab consumes ~800mb memory.