Sign in

Check if the app is running

There was a problem that the LLM was not able to address. Please rephrase your prompt and try again.

Ensure that all the services constituting the app are running

import json docker_compose_file = "dagknows_src/app_docker_compose_build_deploy/localdev-saas-docker-compose.yml" cmd = f'sudo docker-compose -f {docker_compose_file} ps' op = _exe(instance_id, cmd) lines = op.split('\n') services = [ "postgres", "adminer", "elasticsearch", "documentation", "req_router", "conv-mgr", "apigateway", "ansi_processing", "settings", "conv_sse", "proxy_sse", "nlp", "dag", "nginx" ] broken_services = [] _problem = False for service in services: cmd1 = cmd + f' {service}' op1 = _exe(instance_id, cmd1) if 'Up' not in op1: broken_services.append(service) _problem = True print(json.dumps(broken_services, indent=4)) app_is_up = not _problem
copied
  1. 1

    Restart the app if services are down

    There was a problem that the LLM was not able to address. Please rephrase your prompt and try again.

    Just see if the restarting the broken services helps. This is just a remediation, not a solution. We may still need to root-cause the services going down.

    docker_compose_file = "dagknows_src/app_docker_compose_build_deploy/localdev-saas-docker-compose.yml" import time _proceed = False if not app_is_up: cmd = f'sudo docker-compose -f {docker_compose_file} up -d' op = _exei(instance_id, cmd) time.sleep(30) _proceed = True msg = "Restarting the application" print(msg) cmd = f'sudo docker-compose -f {docker_compose_file} ps' op1 = _exei(instance_id, cmd) print(op1)
    copied
    1