2026-04-30 18:31:59,052 - main - INFO - === Logging system initialized ===
2026-04-30 18:31:59,053 - main - INFO - Log file: logs/app_20260430_183159.log
2026-04-30 18:31:59,053 - main - INFO - Log level: INFO
2026-04-30 18:31:59,053 - main - INFO - Timestamp: 20260430_183159
2026-04-30 18:31:59,113 - main - INFO - Included router: routers.admin_dashboard.router
2026-04-30 18:31:59,158 - main - INFO - Included router: routers.agent_availability.router
2026-04-30 18:31:59,876 - main - INFO - Included router: routers.ai_ticket_summary.router
2026-04-30 18:31:59,901 - main - INFO - Included router: routers.aihub.router
2026-04-30 18:31:59,922 - main - INFO - Included router: routers.auth.router
2026-04-30 18:31:59,982 - main - INFO - Included router: routers.chat_analytics_daily.router
2026-04-30 18:32:00,039 - main - INFO - Included router: routers.chat_attachments.router
2026-04-30 18:32:00,134 - main - INFO - Included router: routers.chat_branding.router
2026-04-30 18:32:00,151 - main - INFO - Included router: routers.chat_branding_api.router
2026-04-30 18:32:00,217 - main - INFO - Included router: routers.chat_conversations.router
2026-04-30 18:32:00,353 - main - INFO - Included router: routers.chat_messages.router
2026-04-30 18:32:00,412 - main - INFO - Included router: routers.chat_routing_rules.router
2026-04-30 18:32:00,438 - main - INFO - Included router: routers.contact.router
2026-04-30 18:32:00,479 - main - INFO - Included router: routers.contact_inquiries.router
2026-04-30 18:32:00,481 - main - INFO - Included router: routers.health.router
2026-04-30 18:32:00,525 - main - INFO - Included router: routers.kb_articles.router
2026-04-30 18:32:00,576 - main - INFO - Included router: routers.notification_preferences.router
2026-04-30 18:32:00,637 - main - INFO - Included router: routers.notifications.router
2026-04-30 18:32:00,701 - main - INFO - Included router: routers.plans.router
2026-04-30 18:32:00,725 - main - INFO - Included router: routers.settings.router
2026-04-30 18:32:00,768 - main - INFO - Included router: routers.site_settings.router
2026-04-30 18:32:00,811 - main - INFO - Included router: routers.smtp_settings.router
2026-04-30 18:32:00,851 - main - INFO - Included router: routers.storage.router
2026-04-30 18:32:00,964 - main - INFO - Included router: routers.support_chat.router
2026-04-30 18:32:01,105 - main - INFO - Included router: routers.support_departments.router
2026-04-30 18:32:01,153 - main - INFO - Included router: routers.support_seats.router
2026-04-30 18:32:01,162 - main - INFO - Included router: routers.ticket_notifications_sync.router
2026-04-30 18:32:01,201 - main - INFO - Included router: routers.ticket_summaries.router
2026-04-30 18:32:01,242 - main - INFO - Included router: routers.ticket_sync_states.router
2026-04-30 18:32:01,250 - main - INFO - Included router: routers.user.router
2026-04-30 18:32:01,293 - main - INFO - Included router: routers.user_profiles.router
2026-04-30 18:32:01,332 - main - INFO - Included router: routers.user_roles.router
2026-04-30 18:32:01,413 - main - INFO - Included router: routers.whmcs.router
2026-04-30 18:32:01,473 - main - INFO - Included router: routers.whmcs_admin.router
2026-04-30 18:32:01,511 - main - INFO - Included router: routers.whmcs_extra.router
2026-04-30 18:32:01,512 - main - INFO - === Application startup initiated ===
2026-04-30 18:32:01,513 - services.database - INFO - Ignore creating tables
2026-04-30 18:32:01,513 - services.mock_data - INFO - Ignore initialize data
2026-04-30 18:32:01,513 - services.auth - INFO - Ignore initialize admin
2026-04-30 18:32:01,513 - main - INFO - === Application startup completed successfully ===
2026-04-30 18:32:23,571 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-30 18:32:23,571 - core.database - WARNING - Database session maker not available, attempting lazy initialization...
2026-04-30 18:32:23,571 - core.database - WARNING - Database not initialized, attempting lazy initialization...
2026-04-30 18:32:23,572 - core.database - INFO - Starting database initialization...
2026-04-30 18:32:23,572 - core.config - DEBUG - Read dynamic attribute database_url from environment variable DATABASE_URL
2026-04-30 18:32:23,572 - core.database - INFO - Normalizing database URL for async compatibility...
2026-04-30 18:32:23,574 - core.database - INFO - Creating async database engine...
2026-04-30 18:32:23,575 - core.database - INFO - Using QueuePool with connection pooling for non-Lambda environment
2026-04-30 18:32:23,625 - core.database - INFO - Database engine created successfully
2026-04-30 18:32:23,625 - core.database - INFO - Creating async session maker...
2026-04-30 18:32:23,625 - core.database - INFO - Async session maker created successfully
2026-04-30 18:32:23,625 - core.database - INFO - Database connection initialized successfully
2026-04-30 18:32:23,625 - core.database - DEBUG - [DB_OP] Starting create_tables
2026-04-30 18:32:23,625 - core.database - INFO - 🔧 Starting table creation...
2026-04-30 18:32:23,632 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-30 18:32:23,632 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0003s
2026-04-30 18:32:23,632 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"branding"}, sort=None, skip=0, limit=1, fields=None
2026-04-30 18:32:23,640 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-04-30 18:32:23,641 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-30 18:32:23,641 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0003s
2026-04-30 18:32:23,642 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"general"}, sort=None, skip=0, limit=1, fields=None
2026-04-30 18:32:25,037 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-04-30 18:32:25,038 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.4064s
2026-04-30 18:32:25,053 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-04-30 18:32:25,054 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.4129s
2026-04-30 18:32:26,300 - core.database - INFO - Tables initialized successfully
2026-04-30 18:32:26,300 - core.database - DEBUG - [DB_OP] Create tables completed in 2.6748s
2026-04-30 18:32:26,364 - core.database - INFO - Lazy database initialization completed successfully
2026-04-30 18:32:26,364 - core.database - DEBUG - [DB_OP] Database session created successfully in 2.7932s
2026-04-30 18:32:26,805 - core.database - DEBUG - [DB_OP] Database session cleanup after 3.2344s
2026-04-30 18:33:24,029 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-30 18:33:24,030 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-04-30 18:33:24,468 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4388s
2026-04-30 18:33:51,865 - httpcore.connection - DEBUG - connect_tcp.started host='client.doiteasy.net' port=443 local_address=None timeout=10.0 socket_options=None
2026-04-30 18:33:52,207 - httpcore.connection - DEBUG - connect_tcp.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x7fd36969ea10>
2026-04-30 18:33:52,207 - httpcore.connection - DEBUG - start_tls.started ssl_context=<ssl.SSLContext object at 0x7fd3696f3e40> server_hostname='client.doiteasy.net' timeout=10.0
2026-04-30 18:33:52,381 - httpcore.connection - DEBUG - start_tls.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x7fd36c1d5690>
2026-04-30 18:33:52,382 - httpcore.http11 - DEBUG - send_request_headers.started request=<Request [b'POST']>
2026-04-30 18:33:52,382 - httpcore.http11 - DEBUG - send_request_headers.complete
2026-04-30 18:33:52,382 - httpcore.http11 - DEBUG - send_request_body.started request=<Request [b'POST']>
2026-04-30 18:33:52,382 - httpcore.http11 - DEBUG - send_request_body.complete
2026-04-30 18:33:52,383 - httpcore.http11 - DEBUG - receive_response_headers.started request=<Request [b'POST']>
2026-04-30 18:33:52,687 - httpcore.http11 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 403, b'Forbidden', [(b'Server', b'nginx'), (b'Date', b'Fri, 01 May 2026 01:33:52 GMT'), (b'Content-Type', b'application/json'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Expires', b'Thu, 19 Nov 1981 08:52:00 GMT'), (b'Cache-Control', b'no-store, no-cache, must-revalidate'), (b'Pragma', b'no-cache'), (b'Set-Cookie', b'WHMCShaXcqDDHD9SP=b8a235e672059b086498314ccdf67d62; path=/; secure; HttpOnly'), (b'X-Content-Type-Options', b'nosniff'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'Referrer-Policy', b'strict-origin-when-cross-origin'), (b'X-XSS-Protection', b'1; mode=block')])
2026-04-30 18:33:52,688 - httpx - INFO - HTTP Request: POST https://client.doiteasy.net/includes/api.php "HTTP/1.1 403 Forbidden"
2026-04-30 18:33:52,688 - httpcore.http11 - DEBUG - receive_response_body.started request=<Request [b'POST']>
2026-04-30 18:33:52,689 - httpcore.http11 - DEBUG - receive_response_body.complete
2026-04-30 18:33:52,689 - httpcore.http11 - DEBUG - response_closed.started
2026-04-30 18:33:52,689 - httpcore.http11 - DEBUG - response_closed.complete
2026-04-30 18:33:52,690 - httpcore.connection - DEBUG - close.started
2026-04-30 18:33:52,690 - httpcore.connection - DEBUG - close.complete
2026-04-30 18:33:52,691 - services.whmcs - ERROR - WHMCS API returned HTTP 403 for action ValidateLogin (cf-ray=None server=nginx): {"result":"error","message":"Invalid IP 103.234.62.170"}
2026-04-30 18:34:23,567 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-30 18:34:23,568 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-04-30 18:34:23,882 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3153s
2026-04-30 18:34:47,380 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-30 18:34:47,380 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-04-30 18:34:47,382 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-04-30 18:34:47,392 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-30 18:34:47,393 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0015s
2026-04-30 18:34:47,394 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"branding"}, sort=None, skip=0, limit=1, fields=None
2026-04-30 18:34:47,396 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-30 18:34:47,396 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0002s
2026-04-30 18:34:47,396 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"general"}, sort=None, skip=0, limit=1, fields=None
2026-04-30 18:34:47,702 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3220s
2026-04-30 18:34:47,770 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-04-30 18:34:47,771 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3753s
2026-04-30 18:34:47,902 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-04-30 18:34:47,903 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.5113s
2026-04-30 18:35:16,826 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-30 18:35:16,827 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-04-30 18:35:16,828 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-30 18:35:16,828 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0002s
2026-04-30 18:35:16,829 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"branding"}, sort=None, skip=0, limit=1, fields=None
2026-04-30 18:35:16,831 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-04-30 18:35:16,832 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-30 18:35:16,833 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-04-30 18:35:16,833 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"general"}, sort=None, skip=0, limit=1, fields=None
2026-04-30 18:35:17,142 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3155s
2026-04-30 18:35:17,206 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-04-30 18:35:17,206 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3784s
2026-04-30 18:35:17,216 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-04-30 18:35:17,216 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.3841s
2026-04-30 18:35:50,813 - services.database - DEBUG - [DB_OP] Starting database close
2026-04-30 18:35:51,011 - core.database - INFO - Database connection closed and engine disposed
2026-04-30 18:35:51,013 - services.database - INFO - Database connections closed
2026-04-30 18:35:51,013 - services.database - DEBUG - [DB_OP] Database close completed in 0.2007s
