2026-05-02 21:47:41,315 - main - INFO - === Logging system initialized ===
2026-05-02 21:47:41,315 - main - INFO - Log file: logs/app_20260502_214741.log
2026-05-02 21:47:41,315 - main - INFO - Log level: INFO
2026-05-02 21:47:41,315 - main - INFO - Timestamp: 20260502_214741
2026-05-02 21:47:41,377 - main - INFO - Included router: routers.admin_dashboard.router
2026-05-02 21:47:41,417 - main - INFO - Included router: routers.admin_users.router
2026-05-02 21:47:41,453 - main - INFO - Included router: routers.agent_availability.router
2026-05-02 21:47:42,319 - main - INFO - Included router: routers.ai_ticket_summary.router
2026-05-02 21:47:42,340 - main - INFO - Included router: routers.aihub.router
2026-05-02 21:47:42,354 - main - INFO - Included router: routers.audit_log.router
2026-05-02 21:47:42,383 - main - INFO - Included router: routers.auth.router
2026-05-02 21:47:42,421 - main - INFO - Included router: routers.cache_settings.router
2026-05-02 21:47:42,481 - main - INFO - Included router: routers.carts.router
2026-05-02 21:47:42,530 - main - INFO - Included router: routers.chat_analytics_daily.router
2026-05-02 21:47:42,574 - main - INFO - Included router: routers.chat_attachments.router
2026-05-02 21:47:42,638 - main - INFO - Included router: routers.chat_branding.router
2026-05-02 21:47:42,652 - main - INFO - Included router: routers.chat_branding_api.router
2026-05-02 21:47:42,792 - main - INFO - Included router: routers.chat_conversations.router
2026-05-02 21:47:42,838 - main - INFO - Included router: routers.chat_messages.router
2026-05-02 21:47:42,882 - main - INFO - Included router: routers.chat_routing_rules.router
2026-05-02 21:47:42,914 - main - INFO - Included router: routers.contact.router
2026-05-02 21:47:42,962 - main - INFO - Included router: routers.contact_inquiries.router
2026-05-02 21:47:43,007 - main - INFO - Included router: routers.ecom_checkout.router
2026-05-02 21:47:43,038 - main - INFO - Included router: routers.health.router
2026-05-02 21:47:43,080 - main - INFO - Included router: routers.kb_article_feedback.router
2026-05-02 21:47:43,124 - main - INFO - Included router: routers.kb_articles.router
2026-05-02 21:47:43,140 - main - INFO - Included router: routers.local_auth.router
2026-05-02 21:47:43,184 - main - INFO - Included router: routers.notification_preferences.router
2026-05-02 21:47:43,235 - main - INFO - Included router: routers.notifications.router
2026-05-02 21:47:43,241 - main - INFO - Included router: routers.notifications_extras.router
2026-05-02 21:47:43,325 - main - INFO - Included router: routers.oauth.router
2026-05-02 21:47:43,503 - main - INFO - Included router: routers.order_items.router
2026-05-02 21:47:43,562 - main - INFO - Included router: routers.orders.router
2026-05-02 21:47:43,568 - main - INFO - Included router: routers.password_reset.router
2026-05-02 21:47:43,635 - main - INFO - Included router: routers.plans.router
2026-05-02 21:47:43,708 - main - INFO - Included router: routers.product_categories.router
2026-05-02 21:47:43,781 - main - INFO - Included router: routers.product_reviews.router
2026-05-02 21:47:43,843 - main - INFO - Included router: routers.products.router
2026-05-02 21:47:43,866 - main - INFO - Included router: routers.role_management.router
2026-05-02 21:47:43,915 - main - INFO - Included router: routers.service_testimonials.router
2026-05-02 21:47:43,936 - main - INFO - Included router: routers.settings.router
2026-05-02 21:47:43,979 - main - INFO - Included router: routers.site_settings.router
2026-05-02 21:47:44,047 - main - INFO - Included router: routers.smtp_settings.router
2026-05-02 21:47:44,088 - main - INFO - Included router: routers.storage.router
2026-05-02 21:47:44,378 - main - INFO - Included router: routers.support_chat.router
2026-05-02 21:47:44,415 - main - INFO - Included router: routers.support_departments.router
2026-05-02 21:47:44,456 - main - INFO - Included router: routers.support_seats.router
2026-05-02 21:47:44,463 - main - INFO - Included router: routers.ticket_notifications_sync.router
2026-05-02 21:47:44,498 - main - INFO - Included router: routers.ticket_summaries.router
2026-05-02 21:47:44,545 - main - INFO - Included router: routers.ticket_sync_states.router
2026-05-02 21:47:44,556 - main - INFO - Included router: routers.user.router
2026-05-02 21:47:44,610 - main - INFO - Included router: routers.user_profiles.router
2026-05-02 21:47:44,659 - main - INFO - Included router: routers.user_roles.router
2026-05-02 21:47:44,678 - main - INFO - Included router: routers.whmcs.router
2026-05-02 21:47:44,749 - main - INFO - Included router: routers.whmcs_admin.router
2026-05-02 21:47:44,793 - main - INFO - Included router: routers.whmcs_extra.router
2026-05-02 21:47:44,795 - main - INFO - === Application startup initiated ===
2026-05-02 21:47:44,795 - services.database - INFO - Ignore creating tables
2026-05-02 21:47:44,795 - services.mock_data - INFO - Ignore initialize data
2026-05-02 21:47:44,796 - services.auth - INFO - Ignore initialize admin
2026-05-02 21:47:44,796 - main - INFO - === Application startup completed successfully ===
2026-05-02 21:47:48,069 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 21:47:48,069 - core.database - WARNING - Database session maker not available, attempting lazy initialization...
2026-05-02 21:47:48,069 - core.database - WARNING - Database not initialized, attempting lazy initialization...
2026-05-02 21:47:48,070 - core.database - INFO - Starting database initialization...
2026-05-02 21:47:48,070 - core.config - DEBUG - Read dynamic attribute database_url from environment variable DATABASE_URL
2026-05-02 21:47:48,070 - core.database - INFO - Normalizing database URL for async compatibility...
2026-05-02 21:47:48,071 - core.database - INFO - Creating async database engine...
2026-05-02 21:47:48,071 - core.database - INFO - Using QueuePool with connection pooling for non-Lambda environment
2026-05-02 21:47:48,121 - core.database - INFO - Database engine created successfully
2026-05-02 21:47:48,122 - core.database - INFO - Creating async session maker...
2026-05-02 21:47:48,122 - core.database - INFO - Async session maker created successfully
2026-05-02 21:47:48,122 - core.database - INFO - Database connection initialized successfully
2026-05-02 21:47:48,122 - core.database - DEBUG - [DB_OP] Starting create_tables
2026-05-02 21:47:48,123 - core.database - INFO - 🔧 Starting table creation...
2026-05-02 21:47:48,129 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 21:47:48,129 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0003s
2026-05-02 21:47:48,134 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-05-02 21:47:48,138 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 21:47:48,138 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0002s
2026-05-02 21:47:48,138 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"branding"}, sort=None, skip=0, limit=1, fields=None
2026-05-02 21:47:48,141 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 21:47:48,142 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0011s
2026-05-02 21:47:48,143 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"general"}, sort=None, skip=0, limit=1, fields=None
2026-05-02 21:47:49,399 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.2702s
2026-05-02 21:47:49,526 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-02 21:47:49,526 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.3850s
2026-05-02 21:47:49,528 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-02 21:47:49,529 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.3907s
2026-05-02 21:47:51,587 - core.database - INFO - Tables initialized successfully
2026-05-02 21:47:51,587 - core.database - DEBUG - [DB_OP] Create tables completed in 3.4653s
2026-05-02 21:47:51,651 - core.database - INFO - Lazy database initialization completed successfully
2026-05-02 21:47:51,651 - core.database - DEBUG - [DB_OP] Database session created successfully in 3.5823s
2026-05-02 21:47:51,652 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/admin/cache
2026-05-02 21:47:51,652 - 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 21:47:51,657 - core.database - DEBUG - [DB_OP] Database session cleanup after 3.5882s
2026-05-02 21:47:51,658 - 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 21:48:48,061 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 21:48:48,061 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 21:48:48,443 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3818s
2026-05-02 21:49:48,060 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 21:49:48,060 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-05-02 21:49:48,503 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4427s
2026-05-02 21:50:48,059 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 21:50:48,060 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0009s
2026-05-02 21:50:48,507 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4479s
2026-05-02 21:51:48,059 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 21:51:48,060 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0006s
2026-05-02 21:51:48,501 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4419s
2026-05-02 21:52:48,060 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 21:52:48,060 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-05-02 21:52:48,378 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3186s
2026-05-02 21:53:48,060 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 21:53:48,060 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 21:53:48,376 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3169s
2026-05-02 21:54:48,060 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 21:54:48,061 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-05-02 21:54:48,380 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3201s
2026-05-02 21:55:48,060 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 21:55:48,060 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 21:55:48,378 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3180s
2026-05-02 21:56:48,059 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 21:56:48,060 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-02 21:56:48,502 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4425s
2026-05-02 21:57:48,059 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 21:57:48,059 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-05-02 21:57:48,502 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4434s
2026-05-02 21:58:30,076 - services.database - DEBUG - [DB_OP] Starting database close
2026-05-02 21:58:30,342 - core.database - INFO - Database connection closed and engine disposed
2026-05-02 21:58:30,342 - services.database - INFO - Database connections closed
2026-05-02 21:58:30,342 - services.database - DEBUG - [DB_OP] Database close completed in 0.2663s
