Skip to content

Fix critical server startup and performance issues #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Mgabr90
Copy link

@Mgabr90 Mgabr90 commented Jun 3, 2025

This commit addresses two critical issues:

  1. Server Startup Fix: Resolves ValueError preventing server from starting

    • Add import os statement
    • Set LOG_LEVEL environment variable to 'INFO' by default
    • Pass explicit log_level='INFO' parameter to FastMCP constructor
    • Fixes: "ValueError: Invalid log level: info. Expected one of: ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']"
  2. Critical Performance Fix: Remove duplicate PDF processing in save_path mode

    • Previously, PDFs were processed twice when using save_path (lines 47 & 51)
    • This caused 2x processing time and unnecessary resource usage for large files
    • Now PDF is processed only once and content reused for file writing

These fixes resolve server startup failures and significantly improve performance for file-saving operations.

This commit addresses two critical issues:

1. **Server Startup Fix**: Resolves ValueError preventing server from starting
   - Add import os statement
   - Set LOG_LEVEL environment variable to 'INFO' by default  
   - Pass explicit log_level='INFO' parameter to FastMCP constructor
   - Fixes: \"ValueError: Invalid log level: info. Expected one of: ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']\"

2. **Critical Performance Fix**: Remove duplicate PDF processing in save_path mode
   - Previously, PDFs were processed twice when using save_path (lines 47 & 51)
   - This caused 2x processing time and unnecessary resource usage for large files
   - Now PDF is processed only once and content reused for file writing

These fixes resolve server startup failures and significantly improve performance for file-saving operations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant