
I’ve been moving over from Notion to Affine and the docker container kept crashing.
TLDR: if you’re not using the AI features, turn off the copilot process in affine.
Specifically it ran out of memory through a JS heap error. The culprit was the copilot function, which was embedding all of my notes so an AI tool could use it.
Since I have no intention of using any AI services with Affine, I turned this off.
This took the ram consumption down from 4GB (!!) to around 450MB.
Note: I initially tried to solve this by giving Affine more memory but it just kept chewing through whatever I allocated - all the way up to 6GB.
Making the Copilot change required 1 addition to the config.js file
"copilot": {
"enabled": false
}What does Copilot do in Affine?
Copilot is not the normal editor or sync system. It provides AFFiNE’s ai abilities for stuff like chat, document embeddings, reranking, image generation, audio transcription, coding and text-generation task - none of which interest me.
In practical terms, turning it off means:
- Normal AFFiNE stays: pages, workspaces, editing, syncing, authentication and storage should continue to work independently of Copilot.
- AI features go away: things like AI chat, AI-generated/summarised text and other Copilot functions will no longer work.
- Document embedding stops: AFFiNE should stop generating AI vector embeddings of your documents in the background. Those embeddings are used to give AI features searchable/contextual knowledge of your workspace. AFFiNE has an active embedding pipeline specifically tied to Copilot.
You’re welcome random stranger who might find this when they’re fighting with Affine.
Latest
More from the site
Lester
Fixing self hosted Affine instances that won’t load workspaces.
I recently set up a self-hosted AFFiNE server behind a Cloudflare Tunnel. I’m getting sick of paying for Notion and the AI bloat is making the product very annoying to use. In my mind it was a Simple
Read post
Lester
Why I’m sticking with Quotion even though it is objectively worse than Wordpress
Quotion.co is missing a lot of the “important” features that Wordpress offers, and for me that’s exactly the point. If you don’t know about it, Quotion basically turns Apple Notes into blog posts. No
Read post
Lester
frameworks
Revolving Doors, Tattoos and Decisions.
#frameworks An important part of being able to move fast or knowing when to slow down is to really understand the types of decisions you are confronting. If I have a decision to make, I try to break
Read post
