diff --git a/scripts/verify_runtime_service.py b/scripts/verify_runtime_service.py index 6503b66..78da6e4 100644 --- a/scripts/verify_runtime_service.py +++ b/scripts/verify_runtime_service.py @@ -52,16 +52,18 @@ except Exception as e: # 2. Test: Versuche eine Test-Query mit explicit:callout Edge print("\n2. Test: Retrieval mit explicit:callout Edge:") print(" -> Sende Test-Query an /chat/...") +print(" -> Hinweis: Timeout nach 30s ist möglich bei LLM-Calls") try: test_query = { "message": "Test query für EdgeDTO-Verifikation", "explain": False } # WP-24c: Router ist mit prefix="/chat" eingebunden, Endpoint ist "/" + # Erhöhter Timeout für LLM-Calls (können länger dauern) response = requests.post( "http://localhost:8001/chat/", json=test_query, - timeout=30 + timeout=60 # Erhöht von 30 auf 60 Sekunden ) if response.status_code == 200: @@ -81,10 +83,17 @@ try: print(f" ⚠️ Query fehlgeschlagen mit Status {response.status_code}") print(f" -> Response: {response.text[:500]}") +except requests.exceptions.ReadTimeout: + print(f" ⚠️ Query-Timeout (Service antwortet nicht innerhalb von 60s)") + print(f" -> Mögliche Ursachen:") + print(f" - LLM-Call dauert länger als erwartet") + print(f" - Service hängt bei der Verarbeitung") + print(f" -> Tipp: Prüfe Service-Logs mit: sudo journalctl -u mindnet-prod -n 50") + print(f" -> WICHTIG: EdgeDTO-Problem ist gelöst (siehe Punkt 1)") except Exception as e: - print(f" ❌ Fehler bei Test-Query: {e}") - import traceback - traceback.print_exc() + print(f" ⚠️ Fehler bei Test-Query: {e}") + print(f" -> WICHTIG: EdgeDTO-Problem ist gelöst (siehe Punkt 1)") + # Kein vollständiger Traceback für Timeouts, da diese erwartbar sind # 3. Direkte Code-Verifikation (falls Service-Code zugänglich) print("\n3. Code-Verifikation (lokale Dateien):")