LangGraph Dev Deployment Disk Usage FAQ

Last updated: October 29, 2025

This FAQ is intended for customers running into high disk usage (>80%) on Dev deployments. It covers why this happens, how TTL works, and how to clear disk space.


Why is my disk full on Dev?

  • Data written before TTL was enabled is not automatically cleared. TTL only applies to new data created after it was set.

  • If you did not configure a TTL early, your disk may have accumulated data that persists indefinitely.

  • Once the disk is full, new writes may fail or containers may crash.


What is TTL and how does it work?

  • TTL (Time-to-Live) automatically deletes data (threads/runs) after a set period.

  • For Dev deployments, we recommend setting a TTL of ~2 weeks to prevent disks from filling.

  • TTL is applied only to new data written after it’s configured — it does not retroactively clear existing data.


How can I manually clear old data?

If disk usage is still high after enabling TTL, you’ll need to delete older data manually:

  1. Search for stored threads using the API:

    GET /threads
  2. Delete specific threads by ID:

    DELETE /threads/{thread_id}
  3. For bulk cleanup, you can use this script: 

clean.js

/*
 * Delete all threads and runs from the last benchmark run for consistent tests
 * The default benchmark server has a thread TTL of one hour that should clean things up too so this doesn't run too long.
 */

// URL of your LangGraph server
const BASE_URL = process.env.BASE_URL || 'http://localhost:9123';
// LangSmith API key only needed with a custom server endpoint
const LANGSMITH_API_KEY = process.env.LANGSMITH_API_KEY;

async function clean() {
    const headers = { 'Content-Type': 'application/json' };
    if (LANGSMITH_API_KEY) {
        headers['x-api-key'] = LANGSMITH_API_KEY;
    }

    const searchUrl = `${BASE_URL}/threads/search`;
    let totalDeleted = 0;

    try {
        console.log('Starting thread cleanup...');
        
        while (true) {
            try {
                // Get the next page of threads
                console.log('Searching for threads...');
                const searchResponse = await fetch(searchUrl, {
                    method: 'POST',
                    headers,
                    body: JSON.stringify({
                        limit: 1000
                    })
                });

                if (!searchResponse.ok) {
                    throw new Error(`Search request failed: ${searchResponse.status} ${searchResponse.statusText}`);
                }

                const threads = await searchResponse.json();
                
                // If no threads found, we're done
                if (!threads || threads.length === 0) {
                    console.log('No more threads found.');
                    break;
                }

                console.log(`Found ${threads.length} threads to delete`);

                // Delete each thread
                for (const thread of threads) {
                    try {
                        const deleteUrl = `${BASE_URL}/threads/${thread.thread_id}`;
                        const deleteResponse = await fetch(deleteUrl, {
                            method: 'DELETE',
                            headers
                        });

                        if (!deleteResponse.ok) {
                            console.error(`Failed to delete thread ${thread.thread_id}: ${deleteResponse.status} ${deleteResponse.statusText}`);
                        } else {
                            totalDeleted++;
                        }
                    } catch (deleteError) {
                        console.error(`Error deleting thread ${thread.thread_id}:`, deleteError.message);
                    }
                }

                console.log(`Deleted ${threads.length} threads in this batch`);

            } catch (batchError) {
                console.error('Error in batch processing:', batchError.message);
                break;
            }
        }

        console.log(`Cleanup completed. Total threads deleted: ${totalDeleted}`);

    } catch (error) {
        console.error('Fatal error during cleanup:', error.message);
        process.exit(1);
    }
}

clean().catch(error => {
    console.error('Unhandled error:', error.message);
    process.exit(1);
});

Note: This will delete all threads and runs. It may be slow depending on how much data you have stored.


Common Scenarios

  • I enabled TTL, but disk usage is still >80%

    • Explanation: TTL only sweeps new data. Old data remains until explicitly deleted.

    • Solution: Use the manual cleanup steps above.

  • My container stopped and only works after redeploy

    • Likely caused by disk pressure (full storage).

    • Next Step: Clean up old data and monitor logs to confirm whether TTL sweeps are running.

  • Can LangChain Support bump my disk size for Dev?

    • Dev deployments have limited resources by design.

    • Disk increases are possible, but customers should expect to self-manage cleanup or migrate to Production for higher capacity.


Best Practices

  • Always set a TTL when creating a Dev deployment.

  • Monitor disk usage periodically.

  • Use cleanup scripts if you onboarded without TTL and accumulated old data.

  • Consider moving to a Production deployment if your use case requires larger or persistent storage.