RVE LogoReact Video EditorDOCS
React Video Editor Documentation

Lambda Rendering Common Problems

Troubleshooting guide for Lambda-based rendering issues

Common Problems with Lambda Rendering

This guide covers common issues you may encounter when using Lambda rendering and how to resolve them.

Timeout Issues

Problem: Lambda function times out during video processing

Symptoms:

  • Rendering jobs fail with timeout errors
  • Large videos don't complete processing
  • Inconsistent processing times

Solutions:

  1. Increase Lambda timeout:

    const config = {
      renderer: new LambdaRenderer({
        timeout: 900 // Maximum 15 minutes
      })
    };
  2. Optimize video processing:

    • Use lower resolution for preview renders
    • Implement chunked processing for large videos
    • Consider using Step Functions for long-running jobs

Memory Issues

Problem: Lambda function runs out of memory

Symptoms:

  • OutOfMemoryError in logs
  • Processing fails for high-resolution videos
  • Inconsistent behavior with different video sizes

Solutions:

  1. Increase memory allocation:

    const config = {
      renderer: new LambdaRenderer({
        memorySize: 3008 // Maximum Lambda memory
      })
    };
  2. Optimize video handling:

    • Process videos in smaller chunks
    • Use streaming for large files
    • Implement memory-efficient algorithms

Cold Start Delays

Problem: First render request is slow

Symptoms:

  • Initial render takes significantly longer
  • Subsequent renders are faster
  • Inconsistent response times

Solutions:

  1. Implement warm-up strategy:

    // Schedule periodic warm-up calls
    setInterval(async () => {
      await renderer.warmUp();
    }, 300000); // Every 5 minutes
  2. Use provisioned concurrency:

    • Configure provisioned concurrency for your Lambda function
    • Keep functions warm for consistent performance

AWS Service Limits

Problem: Hit AWS service limits

Symptoms:

  • TooManyRequestsException errors
  • Rendering jobs queued but not processed
  • Inconsistent availability

Solutions:

  1. Implement retry logic:

    const renderer = new LambdaRenderer({
      retryAttempts: 3,
      retryDelay: 1000
    });
  2. Request limit increases:

    • Contact AWS support for limit increases
    • Implement exponential backoff
    • Use multiple Lambda functions

Cost Optimization

Problem: Lambda rendering costs are high

Symptoms:

  • Unexpected AWS charges
  • Inefficient resource usage
  • Processing times longer than necessary

Solutions:

  1. Optimize function configuration:

    • Right-size memory allocation
    • Use appropriate timeout values
    • Implement efficient algorithms
  2. Implement caching:

    const renderer = new LambdaRenderer({
      cacheResults: true,
      cacheTTL: 3600 // 1 hour
    });

Debugging Tips

Enable Detailed Logging

const renderer = new LambdaRenderer({
  logLevel: 'debug',
  enableMetrics: true
});

Monitor CloudWatch Metrics

  • Check Lambda invocation metrics
  • Monitor duration and error rates
  • Set up alarms for critical issues

Common Error Codes

  • 400: Bad request - check input parameters
  • 429: Too many requests - implement rate limiting
  • 500: Internal server error - check Lambda logs
  • 502: Bad gateway - check function configuration

Getting Help

If you're still experiencing issues:

  1. Check the AWS Lambda documentation
  2. Review CloudWatch logs for detailed error information
  3. Contact support with specific error messages and logs
  4. Consider using the community forums for similar issues