2026-03-01 10:42:14,786 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:42:14,786 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 10:42:14,836 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:42:14,836 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 10:42:17,418 - DEBUG - database - Database connection closed via context manager 2026-03-01 10:42:17,419 - INFO - config.app_config - Successfully encrypted response of size 12568 bytes (status: 200) 2026-03-01 10:42:17,430 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:42:17,430 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 10:42:17,432 - INFO - course.m_courses - my_courses: Retrieved 5 courses 2026-03-01 10:42:17,432 - INFO - course.m_courses - Course 1 'Grade 8 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 10:42:17,432 - INFO - course.m_courses - Course 2 'Grade 9 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 10:42:17,432 - INFO - course.m_courses - Course 3 'Grade 12 Science Stream': video_count=0, watch_percentage=0.0000% 2026-03-01 10:42:17,432 - INFO - course.m_courses - Course 4 'IOE Entrance Preparation': video_count=1, watch_percentage=0.0000% 2026-03-01 10:42:17,432 - INFO - course.m_courses - Course 5 'Bridge Course (St. Xavier's & SOS Prep)': video_count=0, watch_percentage=0.0000% 2026-03-01 10:42:17,445 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:42:17,445 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 10:42:17,451 - INFO - config.app_config - Successfully encrypted response of size 23232 bytes (status: 200) 2026-03-01 10:42:17,678 - DEBUG - database - Database connection closed via context manager 2026-03-01 10:42:17,678 - INFO - config.app_config - Successfully encrypted response of size 3820 bytes (status: 200) 2026-03-01 10:42:17,682 - DEBUG - database - Database connection closed via context manager 2026-03-01 10:42:17,683 - INFO - config.app_config - Successfully encrypted response of size 48664 bytes (status: 200) 2026-03-01 10:42:17,696 - DEBUG - profile_ - Processing profile for user_id: 60 2026-03-01 10:42:17,738 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:42:17,738 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 10:42:17,741 - INFO - course.m_courses - my_courses: Retrieved 5 courses 2026-03-01 10:42:17,741 - INFO - course.m_courses - Course 1 'Grade 8 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 10:42:17,741 - INFO - course.m_courses - Course 2 'Grade 9 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 10:42:17,741 - INFO - course.m_courses - Course 3 'Grade 12 Science Stream': video_count=0, watch_percentage=0.0000% 2026-03-01 10:42:17,741 - INFO - course.m_courses - Course 4 'IOE Entrance Preparation': video_count=1, watch_percentage=0.0000% 2026-03-01 10:42:17,741 - INFO - course.m_courses - Course 5 'Bridge Course (St. Xavier's & SOS Prep)': video_count=0, watch_percentage=0.0000% 2026-03-01 10:42:17,746 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:42:17,746 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 10:42:17,749 - INFO - profile_ - Profile loaded for user 60: 0/5 courses, 0 videos, 0 day streak 2026-03-01 10:42:20,572 - INFO - audio_generation.live_call_routes - Session 1f36a3ca-56e6-4b9b-83ab-7cf3c034969e saved to database successfully 2026-03-01 10:42:20,572 - INFO - audio_generation.live_call_routes - Started enhanced live call session: 1f36a3ca-56e6-4b9b-83ab-7cf3c034969e for user 60 2026-03-01 10:42:26,329 - INFO - audio_generation.live_call_routes - Processing speech for session 1f36a3ca-56e6-4b9b-83ab-7cf3c034969e in language: English (en-US) 2026-03-01 10:42:26,330 - INFO - audio_generation.live_call_routes - Subsequent interaction #1: Using conversation history only 2026-03-01 10:42:26,330 - INFO - audio_generation.live_call_routes - Generating AI response with full context: 0 chars, user input: 'hello...' 2026-03-01 10:42:26,331 - INFO - audio_generation.live_call_routes - Sending prompt to AI model: 543 chars total [2026-03-01 10:43:46 +0545] [4074108] [INFO] Parent changed, shutting down: [2026-03-01 10:43:46 +0545] [4074108] [INFO] Worker exiting (pid: 4074108) Logging to file: /home2/ashlya/public_html/ashlyaacademy/api/config/logs/AshlyaAcademy_api_dev.log ====================================================================== AI Models Configuration System - Database Mode ====================================================================== 🔧 Models are loaded from database dynamically 📦 To migrate models from GitHub, run: python aimodel_selector/migrate_models_to_db.py ====================================================================== g4f package is available. AI features enabled. Warning: FFmpeg executable not found at /home2/ashlya/public_html/ashlyaacademy/api/audio_generation/ffmpeg/ffmpeg Audio conversion and merging may not work correctly. 📦 Loaded model from DB: codegemma-7b Model: codegemma-7b Status: working DB Provider: AnyProvider Mapped Provider: AnyProvider ⚠️ Model 'llama-3.3-70b' has status 'inactive', finding working alternative... ⚠️ Model 'llama-3.3-70b' not found or inactive in DB, using first working model Fallback: aria (Status: working, DB Provider: OperaAria -> Mapped: OperaAria) Failed to check g4f version: maximum recursion depth exceeded ⚠️ Model 'llama-3.3-70b' has status 'inactive', finding working alternative... ⚠️ Model 'llama-3.3-70b' not found or inactive in DB, using first working model Fallback: aria (Status: working, DB Provider: OperaAria -> Mapped: OperaAria) 📦 Loaded model from DB: codegemma-7b Model: codegemma-7b Status: working DB Provider: AnyProvider Mapped Provider: AnyProvider 2026-03-01 10:43:46,223 - ERROR - asyncio - Task was destroyed but it is pending! task: wait_for=()]> cb=[_chain_future.._call_set_state() at /usr/lib64/python3.9/asyncio/futures.py:391]> Logging to file: /home2/ashlya/public_html/ashlyaacademy/api/config/logs/AshlyaAcademy_api_dev.log ====================================================================== AI Models Configuration System - Database Mode ====================================================================== 🔧 Models are loaded from database dynamically 📦 To migrate models from GitHub, run: python aimodel_selector/migrate_models_to_db.py ====================================================================== 2026-03-01 10:46:48,764 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:46:48,765 - INFO - mysql.connector - package: mysql.connector.plugins 2026-03-01 10:46:48,765 - INFO - mysql.connector - plugin_name: mysql_native_password 2026-03-01 10:46:48,765 - INFO - mysql.connector - AUTHENTICATION_PLUGIN_CLASS: MySQLNativePasswordAuthPlugin 2026-03-01 10:46:48,765 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 10:46:48,771 - INFO - routes.live_ai_sessions_routes - Live AI sessions tables initialized successfully 2026-03-01 10:46:48,779 - INFO - aimodel_selector.db_manager - AI models table initialized successfully 2026-03-01 10:46:48,779 - INFO - routes.model_routes - AI models table initialized g4f package is available. AI features enabled. /home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) 2026-03-01 10:46:48,858 - INFO - utils.async_runner - async_runner: Using real OS thread (gevent monkey-patch detected) 2026-03-01 10:46:48,858 - INFO - ttsfm.client - Initialized TTS client with base URL: https://www.openai.fm Warning: FFmpeg executable not found at /home2/ashlya/public_html/ashlyaacademy/api/audio_generation/ffmpeg/ffmpeg Audio conversion and merging may not work correctly. 2026-03-01 10:46:48,860 - WARNING - root - pdf2image not available. PDF podcast generation will be limited. Install with: pip install pdf2image 2026-03-01 10:46:48,860 - INFO - audio_generation.speech_generator - edge-tts package is available. TTS features enabled. 2026-03-01 10:46:48,861 - INFO - notes_audio_routes - g4f package is available. AI features enabled. 2026-03-01 10:46:48,898 - INFO - config.app_config - All blueprints registered successfully 2026-03-01 10:46:48,898 - INFO - connection_monitor - Connection monitoring functions available with timeout protection 2026-03-01 10:46:48,899 - INFO - app - Database connection monitoring endpoints registered [2026-03-01 10:46:48 +0545] [138139] [INFO] Starting gunicorn 23.0.0 [2026-03-01 10:46:48 +0545] [138139] [INFO] Listening at: http://0.0.0.0:30016 (138139) [2026-03-01 10:46:48 +0545] [138139] [INFO] Using worker: gevent [2026-03-01 10:46:48 +0545] [139078] [INFO] Booting worker with pid: 139078 [2026-03-01 10:46:48 +0545] [139248] [INFO] Booting worker with pid: 139248 [2026-03-01 10:46:49 +0545] [139290] [INFO] Booting worker with pid: 139290 /home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/gunicorn/workers/ggevent.py:38: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['aiohttp.client_exceptions (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_exceptions.py)', 'aiohttp.connector (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/connector.py)', 'urllib3.util.ssl_ (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/ssl_.py)', 'aiohttp.client_reqrep (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_reqrep.py)', 'jwt.jwks_client (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/jwt/jwks_client.py)', 'urllib3.util (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/__init__.py)']. monkey.patch_all() [2026-03-01 10:46:49 +0545] [139421] [INFO] Booting worker with pid: 139421 /home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/gunicorn/workers/ggevent.py:38: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['aiohttp.client_exceptions (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_exceptions.py)', 'aiohttp.connector (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/connector.py)', 'urllib3.util.ssl_ (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/ssl_.py)', 'aiohttp.client_reqrep (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_reqrep.py)', 'jwt.jwks_client (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/jwt/jwks_client.py)', 'urllib3.util (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/__init__.py)']. monkey.patch_all() /home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/gunicorn/workers/ggevent.py:38: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['aiohttp.client_exceptions (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_exceptions.py)', 'aiohttp.connector (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/connector.py)', 'urllib3.util.ssl_ (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/ssl_.py)', 'aiohttp.client_reqrep (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_reqrep.py)', 'jwt.jwks_client (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/jwt/jwks_client.py)', 'urllib3.util (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/__init__.py)']. monkey.patch_all() /home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/gunicorn/workers/ggevent.py:38: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['aiohttp.client_exceptions (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_exceptions.py)', 'aiohttp.connector (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/connector.py)', 'urllib3.util.ssl_ (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/ssl_.py)', 'aiohttp.client_reqrep (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_reqrep.py)', 'jwt.jwks_client (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/jwt/jwks_client.py)', 'urllib3.util (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/__init__.py)']. monkey.patch_all() 2026-03-01 10:51:45,497 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:51:45,498 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 10:51:45,522 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:51:45,522 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 10:51:45,533 - DEBUG - profile_ - Processing profile for user_id: 60 2026-03-01 10:51:45,537 - DEBUG - database - Database connection closed via context manager 2026-03-01 10:51:45,538 - INFO - config.app_config - Successfully encrypted response of size 12568 bytes (status: 200) 2026-03-01 10:51:45,552 - DEBUG - database - Database connection closed via context manager 2026-03-01 10:51:45,554 - INFO - config.app_config - Successfully encrypted response of size 48664 bytes (status: 200) 2026-03-01 10:51:45,582 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:51:45,582 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 10:51:45,589 - INFO - config.app_config - Successfully encrypted response of size 23232 bytes (status: 200) 2026-03-01 10:51:45,594 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:51:45,594 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 10:51:45,605 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:51:45,605 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 10:51:45,607 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:51:45,607 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password Found 5 courses for user 60 Fetching videos for course 3: Grade 8 Full Course Found 0 videos in course 3 Fetching videos for course 4: Grade 9 Full Course Found 0 videos in course 4 Fetching videos for course 7: Grade 12 Science Stream 2026-03-01 10:51:45,609 - DEBUG - database - Database connection closed via context manager Found 0 videos in course 7 Fetching videos for course 10: IOE Entrance Preparation 2026-03-01 10:51:45,610 - INFO - config.app_config - Successfully encrypted response of size 3820 bytes (status: 200) Found 1 videos in course 10 Fetching videos for course 12: Bridge Course (St. Xavier's & SOS Prep) Found 0 videos in course 12 Found total of 1 videos across 5 courses for user 60 2026-03-01 10:51:45,622 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:51:45,622 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 10:51:45,624 - INFO - course.m_courses - my_courses: Retrieved 5 courses 2026-03-01 10:51:45,624 - INFO - course.m_courses - Course 1 'Grade 8 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 10:51:45,624 - INFO - course.m_courses - Course 2 'Grade 9 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 10:51:45,624 - INFO - course.m_courses - Course 3 'Grade 12 Science Stream': video_count=0, watch_percentage=0.0000% 2026-03-01 10:51:45,624 - INFO - course.m_courses - Course 4 'IOE Entrance Preparation': video_count=1, watch_percentage=0.0000% 2026-03-01 10:51:45,624 - INFO - course.m_courses - Course 5 'Bridge Course (St. Xavier's & SOS Prep)': video_count=0, watch_percentage=0.0000% 2026-03-01 10:51:45,642 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:51:45,642 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 10:51:45,644 - INFO - course.m_courses - my_courses: Retrieved 5 courses 2026-03-01 10:51:45,644 - INFO - course.m_courses - Course 1 'Grade 8 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 10:51:45,644 - INFO - course.m_courses - Course 2 'Grade 9 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 10:51:45,644 - INFO - course.m_courses - Course 3 'Grade 12 Science Stream': video_count=0, watch_percentage=0.0000% 2026-03-01 10:51:45,644 - INFO - course.m_courses - Course 4 'IOE Entrance Preparation': video_count=1, watch_percentage=0.0000% 2026-03-01 10:51:45,644 - INFO - course.m_courses - Course 5 'Bridge Course (St. Xavier's & SOS Prep)': video_count=0, watch_percentage=0.0000% 2026-03-01 10:51:45,657 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 10:51:45,657 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 10:51:45,658 - INFO - profile_ - Profile loaded for user 60: 0/5 courses, 0 videos, 0 day streak 2026-03-01 10:51:48,337 - INFO - audio_generation.live_call_routes - Session 3d120d22-8e2d-46af-9959-d3205a54f93d saved to database successfully 2026-03-01 10:51:48,338 - INFO - audio_generation.live_call_routes - Started enhanced live call session: 3d120d22-8e2d-46af-9959-d3205a54f93d for user 60 2026-03-01 10:52:16,163 - INFO - audio_generation.live_call_routes - Session 3d120d22-8e2d-46af-9959-d3205a54f93d saved to database successfully 2026-03-01 10:52:16,170 - INFO - audio_generation.live_call_routes - Session 3d120d22-8e2d-46af-9959-d3205a54f93d saved to database on ending 2026-03-01 10:52:16,170 - INFO - audio_generation.live_call_routes - Session 3d120d22-8e2d-46af-9959-d3205a54f93d ended with stats: {'duration_seconds': 27, 'total_interactions': 0, 'final_understanding_level': 0.5, 'key_topics_covered': [], 'average_response_time': 27.820827, 'language': 'English'} [2026-03-01 10:52:24 +0545] [138139] [INFO] Handling signal: term [2026-03-01 10:52:25 +0545] [139078] [INFO] Worker exiting (pid: 139078) [2026-03-01 10:52:25 +0545] [139248] [INFO] Worker exiting (pid: 139248) [2026-03-01 10:52:25 +0545] [139290] [INFO] Worker exiting (pid: 139290) [2026-03-01 10:52:25 +0545] [139421] [INFO] Worker exiting (pid: 139421) [2026-03-01 10:52:26 +0545] [138139] [INFO] Shutting down: Master Logging to file: /home2/ashlya/public_html/ashlyaacademy/api/config/logs/AshlyaAcademy_api_dev.log ====================================================================== AI Models Configuration System - Database Mode ====================================================================== 🔧 Models are loaded from database dynamically 📦 To migrate models from GitHub, run: python aimodel_selector/migrate_models_to_db.py ====================================================================== 2026-03-01 11:05:16,241 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 11:05:16,242 - INFO - mysql.connector - package: mysql.connector.plugins 2026-03-01 11:05:16,242 - INFO - mysql.connector - plugin_name: mysql_native_password 2026-03-01 11:05:16,242 - INFO - mysql.connector - AUTHENTICATION_PLUGIN_CLASS: MySQLNativePasswordAuthPlugin 2026-03-01 11:05:16,242 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 11:05:16,249 - INFO - routes.live_ai_sessions_routes - Live AI sessions tables initialized successfully 2026-03-01 11:05:16,260 - INFO - aimodel_selector.db_manager - AI models table initialized successfully 2026-03-01 11:05:16,260 - INFO - routes.model_routes - AI models table initialized g4f package is available. AI features enabled. /home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) 2026-03-01 11:05:16,355 - INFO - utils.async_runner - async_runner: Using real OS thread (gevent monkey-patch detected) 2026-03-01 11:05:16,356 - INFO - ttsfm.client - Initialized TTS client with base URL: https://www.openai.fm Warning: FFmpeg executable not found at /home2/ashlya/public_html/ashlyaacademy/api/audio_generation/ffmpeg/ffmpeg Audio conversion and merging may not work correctly. 2026-03-01 11:05:16,358 - WARNING - root - pdf2image not available. PDF podcast generation will be limited. Install with: pip install pdf2image 2026-03-01 11:05:16,358 - INFO - audio_generation.speech_generator - edge-tts package is available. TTS features enabled. 2026-03-01 11:05:16,359 - INFO - notes_audio_routes - g4f package is available. AI features enabled. 2026-03-01 11:05:16,398 - INFO - config.app_config - All blueprints registered successfully 2026-03-01 11:05:16,399 - INFO - connection_monitor - Connection monitoring functions available with timeout protection 2026-03-01 11:05:16,399 - INFO - app - Database connection monitoring endpoints registered [2026-03-01 11:05:16 +0545] [1851490] [INFO] Starting gunicorn 23.0.0 [2026-03-01 11:05:16 +0545] [1851490] [INFO] Listening at: http://0.0.0.0:30016 (1851490) [2026-03-01 11:05:16 +0545] [1851490] [INFO] Using worker: gevent [2026-03-01 11:05:16 +0545] [1852518] [INFO] Booting worker with pid: 1852518 [2026-03-01 11:05:16 +0545] [1852603] [INFO] Booting worker with pid: 1852603 [2026-03-01 11:05:16 +0545] [1852688] [INFO] Booting worker with pid: 1852688 [2026-03-01 11:05:16 +0545] [1852776] [INFO] Booting worker with pid: 1852776 /home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/gunicorn/workers/ggevent.py:38: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['aiohttp.client_reqrep (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_reqrep.py)', 'urllib3.util.ssl_ (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/ssl_.py)', 'jwt.jwks_client (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/jwt/jwks_client.py)', 'aiohttp.connector (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/connector.py)', 'urllib3.util (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/__init__.py)', 'aiohttp.client_exceptions (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_exceptions.py)']. monkey.patch_all() /home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/gunicorn/workers/ggevent.py:38: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['aiohttp.client_reqrep (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_reqrep.py)', 'urllib3.util.ssl_ (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/ssl_.py)', 'jwt.jwks_client (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/jwt/jwks_client.py)', 'aiohttp.connector (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/connector.py)', 'urllib3.util (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/__init__.py)', 'aiohttp.client_exceptions (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_exceptions.py)']. monkey.patch_all() /home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/gunicorn/workers/ggevent.py:38: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['aiohttp.client_reqrep (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_reqrep.py)', 'urllib3.util.ssl_ (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/ssl_.py)', 'jwt.jwks_client (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/jwt/jwks_client.py)', 'aiohttp.connector (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/connector.py)', 'urllib3.util (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/__init__.py)', 'aiohttp.client_exceptions (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_exceptions.py)']. monkey.patch_all() /home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/gunicorn/workers/ggevent.py:38: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['aiohttp.client_reqrep (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_reqrep.py)', 'urllib3.util.ssl_ (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/ssl_.py)', 'jwt.jwks_client (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/jwt/jwks_client.py)', 'aiohttp.connector (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/connector.py)', 'urllib3.util (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/urllib3/util/__init__.py)', 'aiohttp.client_exceptions (/home2/ashlya/public_html/ashlyaacademy/api/venv/lib64/python3.9/site-packages/aiohttp/client_exceptions.py)']. monkey.patch_all() 2026-03-01 11:05:28,364 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 11:05:28,365 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 11:05:28,372 - DEBUG - database - Database connection closed via context manager 2026-03-01 11:05:28,373 - INFO - config.app_config - Successfully encrypted response of size 12568 bytes (status: 200) Found 5 courses for user 60 Fetching videos for course 3: Grade 8 Full Course Found 0 videos in course 3 Fetching videos for course 4: Grade 9 Full Course Found 0 videos in course 4 Fetching videos for course 7: Grade 12 Science Stream Found 0 videos in course 7 Fetching videos for course 10: IOE Entrance Preparation Found 1 videos in course 10 Fetching videos for course 12: Bridge Course (St. Xavier's & SOS Prep) 2026-03-01 11:08:59,395 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 11:08:59,395 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password Found 0 videos in course 12 Found total of 1 videos across 5 courses for user 60 2026-03-01 11:08:59,418 - DEBUG - profile_ - Processing profile for user_id: 60 2026-03-01 11:08:59,427 - DEBUG - database - Database connection closed via context manager 2026-03-01 11:08:59,429 - INFO - config.app_config - Successfully encrypted response of size 48664 bytes (status: 200) 2026-03-01 11:08:59,443 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 11:08:59,443 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 11:08:59,445 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 11:08:59,445 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 11:08:59,446 - DEBUG - database - Database connection closed via context manager 2026-03-01 11:08:59,447 - INFO - config.app_config - Successfully encrypted response of size 23232 bytes (status: 200) 2026-03-01 11:08:59,447 - INFO - config.app_config - Successfully encrypted response of size 12568 bytes (status: 200) 2026-03-01 11:08:59,448 - DEBUG - database - Database connection closed via context manager 2026-03-01 11:08:59,450 - INFO - config.app_config - Successfully encrypted response of size 3820 bytes (status: 200) 2026-03-01 11:08:59,472 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 11:08:59,472 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 11:08:59,475 - INFO - profile_ - Profile loaded for user 60: 0/5 courses, 0 videos, 0 day streak 2026-03-01 11:08:59,487 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 11:08:59,487 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 11:08:59,489 - INFO - course.m_courses - my_courses: Retrieved 5 courses 2026-03-01 11:08:59,489 - INFO - course.m_courses - Course 1 'Grade 8 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 11:08:59,489 - INFO - course.m_courses - Course 2 'Grade 9 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 11:08:59,489 - INFO - course.m_courses - Course 3 'Grade 12 Science Stream': video_count=0, watch_percentage=0.0000% 2026-03-01 11:08:59,489 - INFO - course.m_courses - Course 4 'IOE Entrance Preparation': video_count=1, watch_percentage=0.0000% 2026-03-01 11:08:59,489 - INFO - course.m_courses - Course 5 'Bridge Course (St. Xavier's & SOS Prep)': video_count=0, watch_percentage=0.0000% 2026-03-01 11:08:59,517 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 11:08:59,517 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 11:08:59,519 - INFO - course.m_courses - my_courses: Retrieved 5 courses 2026-03-01 11:08:59,519 - INFO - course.m_courses - Course 1 'Grade 8 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 11:08:59,519 - INFO - course.m_courses - Course 2 'Grade 9 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 11:08:59,519 - INFO - course.m_courses - Course 3 'Grade 12 Science Stream': video_count=0, watch_percentage=0.0000% 2026-03-01 11:08:59,519 - INFO - course.m_courses - Course 4 'IOE Entrance Preparation': video_count=1, watch_percentage=0.0000% 2026-03-01 11:08:59,519 - INFO - course.m_courses - Course 5 'Bridge Course (St. Xavier's & SOS Prep)': video_count=0, watch_percentage=0.0000% 2026-03-01 11:09:01,899 - INFO - audio_generation.live_call_routes - Session 6fbf1f04-d864-4ac2-a2ce-07313acf9530 saved to database successfully 2026-03-01 11:09:01,900 - INFO - audio_generation.live_call_routes - Started enhanced live call session: 6fbf1f04-d864-4ac2-a2ce-07313acf9530 for user 60 2026-03-01 11:09:51,186 - DEBUG - database - Database connection closed via context manager 2026-03-01 11:09:51,187 - INFO - config.app_config - Successfully encrypted response of size 3820 bytes (status: 200) Found 5 courses for user 60 Fetching videos for course 3: Grade 8 Full Course Found 0 videos in course 3 Fetching videos for course 4: Grade 9 Full Course Found 0 videos in course 4 Fetching videos for course 7: Grade 12 Science Stream Found 0 videos in course 7 Fetching videos for course 10: IOE Entrance Preparation Found 1 videos in course 10 Fetching videos for course 12: Bridge Course (St. Xavier's & SOS Prep) Found 0 videos in course 12 Found total of 1 videos across 5 courses for user 60 2026-03-01 11:09:51,224 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 11:09:51,224 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 11:09:51,228 - DEBUG - database - Database connection closed via context manager 2026-03-01 11:09:51,230 - INFO - config.app_config - Successfully encrypted response of size 12568 bytes (status: 200) 2026-03-01 11:09:51,231 - DEBUG - profile_ - Processing profile for user_id: 60 2026-03-01 11:09:51,237 - INFO - config.app_config - Successfully encrypted response of size 23232 bytes (status: 200) 2026-03-01 11:09:51,247 - DEBUG - database - Database connection closed via context manager 2026-03-01 11:09:51,249 - INFO - config.app_config - Successfully encrypted response of size 48664 bytes (status: 200) 2026-03-01 11:09:51,257 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 11:09:51,257 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 11:09:51,272 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 11:09:51,272 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 11:09:51,274 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 11:09:51,274 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 11:09:51,274 - INFO - course.m_courses - my_courses: Retrieved 5 courses 2026-03-01 11:09:51,274 - INFO - course.m_courses - Course 1 'Grade 8 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 11:09:51,274 - INFO - course.m_courses - Course 2 'Grade 9 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 11:09:51,274 - INFO - course.m_courses - Course 3 'Grade 12 Science Stream': video_count=0, watch_percentage=0.0000% 2026-03-01 11:09:51,275 - INFO - course.m_courses - Course 4 'IOE Entrance Preparation': video_count=1, watch_percentage=0.0000% 2026-03-01 11:09:51,275 - INFO - course.m_courses - Course 5 'Bridge Course (St. Xavier's & SOS Prep)': video_count=0, watch_percentage=0.0000% 2026-03-01 11:09:51,276 - INFO - course.m_courses - my_courses: Retrieved 5 courses 2026-03-01 11:09:51,276 - INFO - course.m_courses - Course 1 'Grade 8 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 11:09:51,276 - INFO - course.m_courses - Course 2 'Grade 9 Full Course': video_count=0, watch_percentage=0.0000% 2026-03-01 11:09:51,276 - INFO - course.m_courses - Course 3 'Grade 12 Science Stream': video_count=0, watch_percentage=0.0000% 2026-03-01 11:09:51,276 - INFO - course.m_courses - Course 4 'IOE Entrance Preparation': video_count=1, watch_percentage=0.0000% 2026-03-01 11:09:51,276 - INFO - course.m_courses - Course 5 'Bridge Course (St. Xavier's & SOS Prep)': video_count=0, watch_percentage=0.0000% 2026-03-01 11:09:51,285 - DEBUG - mysql.connector - # _do_auth(): self._auth_plugin: 2026-03-01 11:09:51,285 - DEBUG - mysql.connector - new_auth_plugin: mysql_native_password 2026-03-01 11:09:51,287 - INFO - profile_ - Profile loaded for user 60: 0/5 courses, 0 videos, 0 day streak 2026-03-01 11:09:52,889 - INFO - config.app_config - Successfully encrypted response of size 36012 bytes (status: 200) 📦 Loaded model from DB: aria Model: aria Status: working DB Provider: OperaAria Mapped Provider: OperaAria 2026-03-01 11:09:53,552 - INFO - config.app_config - Successfully encrypted response of size 256 bytes (status: 200) 2026-03-01 11:09:54,865 - INFO - audio_generation.live_call_routes - Session e6ede8ec-0f21-467a-af89-8a7c2db046c2 saved to database successfully 2026-03-01 11:09:54,865 - INFO - audio_generation.live_call_routes - Started enhanced live call session: e6ede8ec-0f21-467a-af89-8a7c2db046c2 for user 60