2026-05-01 10:13:59,855 - main - INFO - === Logging system initialized ===
2026-05-01 10:13:59,856 - main - INFO - Log file: logs/app_20260501_101359.log
2026-05-01 10:13:59,856 - main - INFO - Log level: INFO
2026-05-01 10:13:59,856 - main - INFO - Timestamp: 20260501_101359
2026-05-01 10:13:59,940 - main - INFO - Included router: routers.admin_dashboard.router
2026-05-01 10:13:59,989 - main - INFO - Included router: routers.agent_availability.router
2026-05-01 10:14:00,885 - main - INFO - Included router: routers.ai_ticket_summary.router
2026-05-01 10:14:00,910 - main - INFO - Included router: routers.aihub.router
2026-05-01 10:14:00,931 - main - INFO - Included router: routers.auth.router
2026-05-01 10:14:00,989 - main - INFO - Included router: routers.chat_analytics_daily.router
2026-05-01 10:14:01,043 - main - INFO - Included router: routers.chat_attachments.router
2026-05-01 10:14:01,135 - main - INFO - Included router: routers.chat_branding.router
2026-05-01 10:14:01,153 - main - INFO - Included router: routers.chat_branding_api.router
2026-05-01 10:14:01,234 - main - INFO - Included router: routers.chat_conversations.router
2026-05-01 10:14:01,373 - main - INFO - Included router: routers.chat_messages.router
2026-05-01 10:14:01,419 - main - INFO - Included router: routers.chat_routing_rules.router
2026-05-01 10:14:01,448 - main - INFO - Included router: routers.contact.router
2026-05-01 10:14:01,496 - main - INFO - Included router: routers.contact_inquiries.router
2026-05-01 10:14:01,500 - main - INFO - Included router: routers.health.router
2026-05-01 10:14:01,552 - main - INFO - Included router: routers.kb_articles.router
2026-05-01 10:14:01,603 - main - INFO - Included router: routers.notification_preferences.router
2026-05-01 10:14:01,657 - main - INFO - Included router: routers.notifications.router
2026-05-01 10:14:01,714 - main - INFO - Included router: routers.plans.router
2026-05-01 10:14:01,744 - main - INFO - Included router: routers.role_management.router
2026-05-01 10:14:01,766 - main - INFO - Included router: routers.settings.router
2026-05-01 10:14:01,810 - main - INFO - Included router: routers.site_settings.router
2026-05-01 10:14:01,867 - main - INFO - Included router: routers.smtp_settings.router
2026-05-01 10:14:01,917 - main - INFO - Included router: routers.storage.router
2026-05-01 10:14:02,227 - main - INFO - Included router: routers.support_chat.router
2026-05-01 10:14:02,273 - main - INFO - Included router: routers.support_departments.router
2026-05-01 10:14:02,327 - main - INFO - Included router: routers.support_seats.router
2026-05-01 10:14:02,337 - main - INFO - Included router: routers.ticket_notifications_sync.router
2026-05-01 10:14:02,392 - main - INFO - Included router: routers.ticket_summaries.router
2026-05-01 10:14:02,447 - main - INFO - Included router: routers.ticket_sync_states.router
2026-05-01 10:14:02,457 - main - INFO - Included router: routers.user.router
2026-05-01 10:14:02,509 - main - INFO - Included router: routers.user_profiles.router
2026-05-01 10:14:02,550 - main - INFO - Included router: routers.user_roles.router
2026-05-01 10:14:02,647 - main - INFO - Included router: routers.whmcs.router
2026-05-01 10:14:02,710 - main - INFO - Included router: routers.whmcs_admin.router
2026-05-01 10:14:02,755 - main - INFO - Included router: routers.whmcs_extra.router
2026-05-01 10:14:02,757 - main - INFO - === Application startup initiated ===
2026-05-01 10:14:02,757 - services.database - INFO - Ignore creating tables
2026-05-01 10:14:02,757 - services.mock_data - INFO - Ignore initialize data
2026-05-01 10:14:02,757 - services.auth - INFO - Ignore initialize admin
2026-05-01 10:14:02,758 - main - INFO - === Application startup completed successfully ===
2026-05-01 10:14:10,046 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:14:10,047 - core.database - WARNING - Database session maker not available, attempting lazy initialization...
2026-05-01 10:14:10,047 - core.database - WARNING - Database not initialized, attempting lazy initialization...
2026-05-01 10:14:10,047 - core.database - INFO - Starting database initialization...
2026-05-01 10:14:10,048 - core.config - DEBUG - Read dynamic attribute database_url from environment variable DATABASE_URL
2026-05-01 10:14:10,048 - core.database - INFO - Normalizing database URL for async compatibility...
2026-05-01 10:14:10,050 - core.database - INFO - Creating async database engine...
2026-05-01 10:14:10,050 - core.database - INFO - Using QueuePool with connection pooling for non-Lambda environment
2026-05-01 10:14:10,116 - core.database - INFO - Database engine created successfully
2026-05-01 10:14:10,117 - core.database - INFO - Creating async session maker...
2026-05-01 10:14:10,117 - core.database - INFO - Async session maker created successfully
2026-05-01 10:14:10,117 - core.database - INFO - Database connection initialized successfully
2026-05-01 10:14:10,117 - core.database - DEBUG - [DB_OP] Starting create_tables
2026-05-01 10:14:10,117 - core.database - INFO - 🔧 Starting table creation...
2026-05-01 10:14:10,123 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-05-01 10:14:10,124 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:14:10,125 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0007s
2026-05-01 10:14:10,126 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"general"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 10:14:10,132 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:14:10,132 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0003s
2026-05-01 10:14:11,416 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.2838s
2026-05-01 10:14:11,551 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 10:14:11,552 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.4273s
2026-05-01 10:14:12,826 - core.database - INFO - Tables initialized successfully
2026-05-01 10:14:12,827 - core.database - DEBUG - [DB_OP] Create tables completed in 2.7099s
2026-05-01 10:14:12,896 - core.database - INFO - Lazy database initialization completed successfully
2026-05-01 10:14:12,897 - core.database - DEBUG - [DB_OP] Database session created successfully in 2.8506s
2026-05-01 10:14:12,898 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"branding"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 10:14:13,473 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 10:14:13,474 - core.database - DEBUG - [DB_OP] Database session cleanup after 3.4274s
2026-05-01 10:14:20,173 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:14:20,174 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0006s
2026-05-01 10:14:20,174 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"login_page"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 10:14:20,178 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:14:20,178 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-05-01 10:14:20,179 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"branding"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 10:14:20,627 - routers.site_settings - DEBUG - Found 1 site_settingss
2026-05-01 10:14:20,628 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4547s
2026-05-01 10:14:20,751 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 10:14:20,752 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.5737s
2026-05-01 10:15:22,865 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:15:22,865 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-01 10:15:23,185 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3207s
2026-05-01 10:16:10,045 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:16:10,046 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0006s
2026-05-01 10:16:10,434 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3891s
2026-05-01 10:16:45,275 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:16:45,276 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0007s
2026-05-01 10:16:45,278 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-05-01 10:16:45,280 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:16:45,280 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0003s
2026-05-01 10:16:45,281 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"branding"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 10:16:45,283 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:16:45,284 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0014s
2026-05-01 10:16:45,285 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"general"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 10:16:45,691 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 10:16:45,692 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4126s
2026-05-01 10:16:45,693 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4179s
2026-05-01 10:16:45,694 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 10:16:45,695 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4117s
2026-05-01 10:16:47,080 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:16:47,080 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0006s
2026-05-01 10:16:47,081 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"branding"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 10:16:47,083 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-05-01 10:16:47,084 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:16:47,085 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0003s
2026-05-01 10:16:47,086 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:16:47,086 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0003s
2026-05-01 10:16:47,087 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"general"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 10:16:47,403 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3183s
2026-05-01 10:16:47,474 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 10:16:47,475 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3951s
2026-05-01 10:16:47,493 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 10:16:47,494 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4077s
2026-05-01 10:17:49,773 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-05-01 10:17:49,777 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:17:49,777 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0003s
2026-05-01 10:17:49,777 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"branding"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 10:17:49,779 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:17:49,780 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0002s
2026-05-01 10:17:49,780 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"general"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 10:17:49,781 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 10:17:49,781 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0002s
2026-05-01 10:17:50,102 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3216s
2026-05-01 10:17:50,160 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 10:17:50,161 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3819s
2026-05-01 10:17:50,163 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 10:17:50,164 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3870s
2026-05-01 10:18:14,694 - services.database - DEBUG - [DB_OP] Starting database close
2026-05-01 10:18:14,896 - core.database - INFO - Database connection closed and engine disposed
2026-05-01 10:18:14,896 - services.database - INFO - Database connections closed
2026-05-01 10:18:14,896 - services.database - DEBUG - [DB_OP] Database close completed in 0.2029s
