2026-05-02 22:20:12,144 - main - INFO - === Logging system initialized ===
2026-05-02 22:20:12,145 - main - INFO - Log file: logs/app_20260502_222012.log
2026-05-02 22:20:12,145 - main - INFO - Log level: INFO
2026-05-02 22:20:12,145 - main - INFO - Timestamp: 20260502_222012
2026-05-02 22:20:12,219 - main - INFO - Included router: routers.admin_dashboard.router
2026-05-02 22:20:12,262 - main - INFO - Included router: routers.admin_users.router
2026-05-02 22:20:12,304 - main - INFO - Included router: routers.agent_availability.router
2026-05-02 22:20:13,146 - main - INFO - Included router: routers.ai_ticket_summary.router
2026-05-02 22:20:13,176 - main - INFO - Included router: routers.aihub.router
2026-05-02 22:20:13,201 - main - INFO - Included router: routers.audit_log.router
2026-05-02 22:20:13,213 - main - INFO - Included router: routers.auth.router
2026-05-02 22:20:13,237 - main - INFO - Included router: routers.cache_settings.router
2026-05-02 22:20:13,292 - main - INFO - Included router: routers.carts.router
2026-05-02 22:20:13,350 - main - INFO - Included router: routers.chat_analytics_daily.router
2026-05-02 22:20:13,410 - main - INFO - Included router: routers.chat_attachments.router
2026-05-02 22:20:13,481 - main - INFO - Included router: routers.chat_branding.router
2026-05-02 22:20:13,498 - main - INFO - Included router: routers.chat_branding_api.router
2026-05-02 22:20:13,659 - main - INFO - Included router: routers.chat_conversations.router
2026-05-02 22:20:13,706 - main - INFO - Included router: routers.chat_messages.router
2026-05-02 22:20:13,752 - main - INFO - Included router: routers.chat_routing_rules.router
2026-05-02 22:20:13,777 - main - INFO - Included router: routers.contact.router
2026-05-02 22:20:13,828 - main - INFO - Included router: routers.contact_inquiries.router
2026-05-02 22:20:13,876 - main - INFO - Included router: routers.ecom_checkout.router
2026-05-02 22:20:13,878 - main - INFO - Included router: routers.health.router
2026-05-02 22:20:13,926 - main - INFO - Included router: routers.kb_article_feedback.router
2026-05-02 22:20:13,973 - main - INFO - Included router: routers.kb_articles.router
2026-05-02 22:20:13,989 - main - INFO - Included router: routers.local_auth.router
2026-05-02 22:20:14,044 - main - INFO - Included router: routers.notification_preferences.router
2026-05-02 22:20:14,102 - main - INFO - Included router: routers.notifications.router
2026-05-02 22:20:14,108 - main - INFO - Included router: routers.notifications_extras.router
2026-05-02 22:20:14,207 - main - INFO - Included router: routers.oauth.router
2026-05-02 22:20:14,434 - main - INFO - Included router: routers.order_items.router
2026-05-02 22:20:14,501 - main - INFO - Included router: routers.orders.router
2026-05-02 22:20:14,509 - main - INFO - Included router: routers.password_reset.router
2026-05-02 22:20:14,566 - main - INFO - Included router: routers.plans.router
2026-05-02 22:20:14,611 - main - INFO - Included router: routers.product_categories.router
2026-05-02 22:20:14,659 - main - INFO - Included router: routers.product_reviews.router
2026-05-02 22:20:14,725 - main - INFO - Included router: routers.products.router
2026-05-02 22:20:14,749 - main - INFO - Included router: routers.role_management.router
2026-05-02 22:20:14,800 - main - INFO - Included router: routers.service_testimonials.router
2026-05-02 22:20:14,824 - main - INFO - Included router: routers.settings.router
2026-05-02 22:20:14,870 - main - INFO - Included router: routers.site_settings.router
2026-05-02 22:20:14,919 - main - INFO - Included router: routers.smtp_settings.router
2026-05-02 22:20:14,956 - main - INFO - Included router: routers.storage.router
2026-05-02 22:20:15,317 - main - INFO - Included router: routers.support_chat.router
2026-05-02 22:20:15,356 - main - INFO - Included router: routers.support_departments.router
2026-05-02 22:20:15,398 - main - INFO - Included router: routers.support_seats.router
2026-05-02 22:20:15,411 - main - INFO - Included router: routers.ticket_notifications_sync.router
2026-05-02 22:20:15,450 - main - INFO - Included router: routers.ticket_summaries.router
2026-05-02 22:20:15,505 - main - INFO - Included router: routers.ticket_sync_states.router
2026-05-02 22:20:15,519 - main - INFO - Included router: routers.user.router
2026-05-02 22:20:15,565 - main - INFO - Included router: routers.user_profiles.router
2026-05-02 22:20:15,604 - main - INFO - Included router: routers.user_roles.router
2026-05-02 22:20:15,621 - main - INFO - Included router: routers.whmcs.router
2026-05-02 22:20:15,681 - main - INFO - Included router: routers.whmcs_admin.router
2026-05-02 22:20:15,720 - main - INFO - Included router: routers.whmcs_extra.router
2026-05-02 22:20:15,721 - main - INFO - === Application startup initiated ===
2026-05-02 22:20:15,721 - services.database - INFO - Ignore creating tables
2026-05-02 22:20:15,722 - services.mock_data - INFO - Ignore initialize data
2026-05-02 22:20:15,722 - services.auth - INFO - Ignore initialize admin
2026-05-02 22:20:15,722 - main - INFO - === Application startup completed successfully ===
2026-05-02 22:20:18,438 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:20:18,438 - core.database - WARNING - Database session maker not available, attempting lazy initialization...
2026-05-02 22:20:18,439 - core.database - WARNING - Database not initialized, attempting lazy initialization...
2026-05-02 22:20:18,439 - core.database - INFO - Starting database initialization...
2026-05-02 22:20:18,439 - core.config - DEBUG - Read dynamic attribute database_url from environment variable DATABASE_URL
2026-05-02 22:20:18,439 - core.database - INFO - Normalizing database URL for async compatibility...
2026-05-02 22:20:18,440 - core.database - INFO - Creating async database engine...
2026-05-02 22:20:18,440 - core.database - INFO - Using QueuePool with connection pooling for non-Lambda environment
2026-05-02 22:20:18,486 - core.database - INFO - Database engine created successfully
2026-05-02 22:20:18,486 - core.database - INFO - Creating async session maker...
2026-05-02 22:20:18,486 - core.database - INFO - Async session maker created successfully
2026-05-02 22:20:18,486 - core.database - INFO - Database connection initialized successfully
2026-05-02 22:20:18,486 - core.database - DEBUG - [DB_OP] Starting create_tables
2026-05-02 22:20:18,486 - core.database - INFO - 🔧 Starting table creation...
2026-05-02 22:20:18,491 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:20:18,492 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0003s
2026-05-02 22:20:18,497 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-05-02 22:20:18,500 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:20:18,501 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-05-02 22:20:18,501 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"branding"}, sort=None, skip=0, limit=1, fields=None
2026-05-02 22:20:18,504 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:20:18,504 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0002s
2026-05-02 22:20:18,504 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"general"}, sort=None, skip=0, limit=1, fields=None
2026-05-02 22:20:19,771 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.2792s
2026-05-02 22:20:19,903 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-02 22:20:19,903 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.4029s
2026-05-02 22:20:19,904 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-02 22:20:19,904 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.4005s
2026-05-02 22:20:21,963 - core.database - INFO - Tables initialized successfully
2026-05-02 22:20:21,963 - core.database - DEBUG - [DB_OP] Create tables completed in 3.4769s
2026-05-02 22:20:22,027 - core.database - INFO - Lazy database initialization completed successfully
2026-05-02 22:20:22,027 - core.database - DEBUG - [DB_OP] Database session created successfully in 3.5893s
2026-05-02 22:20:22,028 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/admin/cache
2026-05-02 22:20:22,028 - core.database - ERROR - Database session error: 401: Authentication credentials were not provided
Traceback (most recent call last):
  File "/workspace/app/backend/core/database.py", line 602, in get_db
    yield session
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 120, in app
    response = await f(request)
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 457, in app
    solved_result = await solve_dependencies(
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/dependencies/utils.py", line 649, in solve_dependencies
    solved_result = await solve_dependencies(
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/dependencies/utils.py", line 649, in solve_dependencies
    solved_result = await solve_dependencies(
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/dependencies/utils.py", line 678, in solve_dependencies
    solved = await call(**solved_result.values)
  File "/workspace/app/backend/dependencies/auth.py", line 24, in get_bearer_token
    raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="Authentication credentials were not provided")
fastapi.exceptions.HTTPException: 401: Authentication credentials were not provided
2026-05-02 22:20:22,044 - core.database - DEBUG - [DB_OP] Database session cleanup after 3.6060s
2026-05-02 22:20:22,045 - core.database - ERROR - Failed to create database session: 401: Authentication credentials were not provided
Traceback (most recent call last):
  File "/workspace/app/backend/core/database.py", line 602, in get_db
    yield session
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 120, in app
    response = await f(request)
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/routing.py", line 457, in app
    solved_result = await solve_dependencies(
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/dependencies/utils.py", line 649, in solve_dependencies
    solved_result = await solve_dependencies(
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/dependencies/utils.py", line 649, in solve_dependencies
    solved_result = await solve_dependencies(
  File "/data/chats/99daa102ba1446f6aa2f99771f457055/.cache/python/lib/python3.10/site-packages/fastapi/dependencies/utils.py", line 678, in solve_dependencies
    solved = await call(**solved_result.values)
  File "/workspace/app/backend/dependencies/auth.py", line 24, in get_bearer_token
    raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="Authentication credentials were not provided")
fastapi.exceptions.HTTPException: 401: Authentication credentials were not provided
2026-05-02 22:21:18,427 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:21:18,428 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-05-02 22:21:18,809 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3817s
2026-05-02 22:22:18,424 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:22:18,424 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 22:22:18,868 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4440s
2026-05-02 22:23:18,405 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:23:18,405 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-05-02 22:23:18,424 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:23:18,424 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 22:23:18,867 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4438s
2026-05-02 22:23:19,828 - core.config - DEBUG - Read dynamic attribute jwt_expire_minutes from environment variable JWT_EXPIRE_MINUTES
2026-05-02 22:23:19,828 - core.config - DEBUG - Read dynamic attribute jwt_secret_key from environment variable JWT_SECRET_KEY
2026-05-02 22:23:19,828 - core.config - DEBUG - Read dynamic attribute jwt_algorithm from environment variable JWT_ALGORITHM
2026-05-02 22:23:20,193 - core.auth - DEBUG - Authentication token created for user hash: 0afaa513
2026-05-02 22:23:20,416 - core.database - DEBUG - [DB_OP] Database session cleanup after 2.0118s
2026-05-02 22:24:18,424 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:24:18,425 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-05-02 22:24:18,742 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3182s
2026-05-02 22:25:18,424 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:25:18,424 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0006s
2026-05-02 22:25:18,742 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3182s
2026-05-02 22:26:18,423 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:26:18,424 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 22:26:18,806 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3827s
2026-05-02 22:27:18,425 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:27:18,425 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 22:27:18,870 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4450s
2026-05-02 22:28:18,424 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:28:18,424 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 22:28:18,868 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4441s
2026-05-02 22:29:18,424 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:29:18,424 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 22:29:18,868 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4444s
2026-05-02 22:30:18,424 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:30:18,424 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 22:30:18,870 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4464s
2026-05-02 22:31:18,424 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:31:18,425 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0007s
2026-05-02 22:31:18,750 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3255s
2026-05-02 22:32:18,423 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:32:18,424 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 22:32:18,742 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3183s
2026-05-02 22:33:18,424 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:33:18,424 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-05-02 22:33:18,742 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3184s
2026-05-02 22:34:18,423 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:34:18,424 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 22:34:18,742 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3184s
2026-05-02 22:35:18,423 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:35:18,424 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 22:35:18,874 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4512s
2026-05-02 22:36:18,424 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:36:18,424 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 22:36:18,870 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4468s
2026-05-02 22:37:18,424 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:37:18,424 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0006s
2026-05-02 22:37:18,868 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4441s
2026-05-02 22:38:18,423 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:38:18,424 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 22:38:18,868 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4447s
2026-05-02 22:39:18,424 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 22:39:18,425 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 22:39:18,746 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3223s
2026-05-02 22:39:32,104 - services.database - DEBUG - [DB_OP] Starting database close
2026-05-02 22:39:32,376 - core.database - INFO - Database connection closed and engine disposed
2026-05-02 22:39:32,376 - services.database - INFO - Database connections closed
2026-05-02 22:39:32,377 - services.database - DEBUG - [DB_OP] Database close completed in 0.2728s
