Error 500 Internal Server Error

POST https://dc-mining-monitoring-new-test.test.itlabs.top/api/agent/v1/samples

Forwarded to ErrorController (3696b5)

Serializer

1 Handled
0.32 ms Total time

default 1

serialize 1

Data Context Normalizer Encoder Time Caller
Symfony\Component\ErrorHandler\Exception\FlattenException
Show contents
Symfony\Component\ErrorHandler\Exception\FlattenException {#1317
  -message: "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'expected_seconds' doesn't have a default value"
  -code: 1364
  -previous: Symfony\Component\ErrorHandler\Exception\FlattenException {#1318 …}
  -trace: [
    [
      "namespace" => ""
      "short_class" => ""
      "class" => ""
      "type" => ""
      "function" => ""
      "file" => "/var/www/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php"
      "line" => 101
      "args" => []
    ]
    [
      "namespace" => "Doctrine\DBAL\Driver\API\MySQL"
      "short_class" => "ExceptionConverter"
      "class" => "Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter"
      "type" => "->"
      "function" => "convert"
      "file" => "/var/www/vendor/doctrine/dbal/src/Connection.php"
      "line" => 1460
      "args" => [
        [
          "object"
          "Doctrine\DBAL\Driver\PDO\Exception"
        ]
        [
          "object"
          "Doctrine\DBAL\Query"
        ]
      ]
    ]
    [
      "namespace" => "Doctrine\DBAL"
      "short_class" => "Connection"
      "class" => "Doctrine\DBAL\Connection"
      "type" => "->"
      "function" => "handleDriverException"
      "file" => "/var/www/vendor/doctrine/dbal/src/Connection.php"
      "line" => 1396
      "args" => [
        [
          "object"
          "Doctrine\DBAL\Driver\PDO\Exception"
        ]
        [
          "object"
          "Doctrine\DBAL\Query"
        ]
      ]
    ]
    [
      "namespace" => "Doctrine\DBAL"
      "short_class" => "Connection"
      "class" => "Doctrine\DBAL\Connection"
      "type" => "->"
      "function" => "convertExceptionDuringQuery"
      "file" => "/var/www/vendor/doctrine/dbal/src/Connection.php"
      "line" => 911
      "args" => [
        [
          "object"
          "Doctrine\DBAL\Driver\PDO\Exception"
        ]
        [
          "string"
          """
            \r\n
            INSERT INTO asic_uptime_bucket\r\n
            (location_id, asic_id, client_id, client_name, granularity, period_start, online_seconds, updated_at)\r\n
            SELECT\r\n
              ? AS location_id,\r\n
              d.asic_id,\r\n
              d.client_id,\r\n
              d.client_name,\r\n
              'hour' AS granularity,\r\n
              d.period_start,\r\n
              d.online,\r\n
              ? AS updated_at\r\n
            FROM (\r\n
              SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online\r\n
            ) d\r\n
            ON DUPLICATE KEY UPDATE\r\n
              online_seconds   = asic_uptime_bucket.online_seconds + VALUES(online_seconds),\r\n
              updated_at       = VALUES(updated_at),\r\n
              client_name      = VALUES(client_name)\r\n
            """
        ]
        [
          "array"
          [
            [
              "integer"
              2
            ]
            [
              "string"
              "2026-03-23 14:18:04"
            ]
            [
              "integer"
              13
            ]
            [
              "integer"
              2
            ]
            [
              "string"
              "ivan"
            ]
            [
              "string"
              "2026-03-23 14:00:00"
            ]
            [
              "integer"
              30
            ]
            [
              "integer"
              1
            ]
            [
              "integer"
              2
            ]
            [
              "string"
              "ivan"
            ]
            [
              "string"
              "2026-03-23 14:00:00"
            ]
            [
              "integer"
              30
            ]
            [
              "integer"
              9
            ]
            [
              "integer"
              2
            ]
            [
              "string"
              "ivan"
            ]
            [
              "string"
              "2026-03-23 14:00:00"
            ]
            [
              "integer"
              0
            ]
            [
              "integer"
              16
            ]
            [
              "integer"
              2
            ]
            [
              "string"
              "ivan"
            ]
            [
              "string"
              "2026-03-23 14:00:00"
            ]
            [
              "integer"
              0
            ]
            [
              "integer"
              8
            ]
            [
              "integer"
              2
            ]
            [
              "string"
              "ivan"
            ]
            [
              "string"
              "2026-03-23 14:00:00"
            ]
            [
              "integer"
              0
            ]
            [
              "integer"
              15
            ]
            [
              "integer"
              2
            ]
            [
              "string"
              "ivan"
            ]
            [
              "string"
              "2026-03-23 14:00:00"
            ]
            [
              "integer"
              0
            ]
          ]
        ]
        [
          "array"
          []
        ]
      ]
    ]
    [
      "namespace" => "Doctrine\DBAL"
      "short_class" => "Connection"
      "class" => "Doctrine\DBAL\Connection"
      "type" => "->"
      "function" => "executeStatement"
      "file" => "/var/www/src/Service/UptimeBucketWriter.php"
      "line" => 94
      "args" => [
        [
          "string"
          """
            \r\n
            INSERT INTO asic_uptime_bucket\r\n
            (location_id, asic_id, client_id, client_name, granularity, period_start, online_seconds, updated_at)\r\n
            SELECT\r\n
              ? AS location_id,\r\n
              d.asic_id,\r\n
              d.client_id,\r\n
              d.client_name,\r\n
              'hour' AS granularity,\r\n
              d.period_start,\r\n
              d.online,\r\n
              ? AS updated_at\r\n
            FROM (\r\n
              SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online\r\n
            ) d\r\n
            ON DUPLICATE KEY UPDATE\r\n
              online_seconds   = asic_uptime_bucket.online_seconds + VALUES(online_seconds),\r\n
              updated_at       = VALUES(updated_at),\r\n
              client_name      = VALUES(client_name)\r\n
            """
        ]
        [
          "array"
          [
            [
              "integer"
              2
            ]
            [
              "string"
              "2026-03-23 14:18:04"
            ]
            [
              "integer"
              13
            ]
            [
              "integer"
              2
            ]
            [
              "string"
              "ivan"
            ]
            [
              "string"
              "2026-03-23 14:00:00"
            ]
            [
              "integer"
              30
            ]
            [
              "integer"
              1
            ]
            [
              "integer"
              2
            ]
            [
              "string"
              "ivan"
            ]
            [
              "string"
              "2026-03-23 14:00:00"
            ]
            [
              "integer"
              30
            ]
            [
              "integer"
              9
            ]
            [
              "integer"
              2
            ]
            [
              "string"
              "ivan"
            ]
            [
              "string"
              "2026-03-23 14:00:00"
            ]
            [
              "integer"
              0
            ]
            [
              "integer"
              16
            ]
            [
              "integer"
              2
            ]
            [
              "string"
              "ivan"
            ]
            [
              "string"
              "2026-03-23 14:00:00"
            ]
            [
              "integer"
              0
            ]
            [
              "integer"
              8
            ]
            [
              "integer"
              2
            ]
            [
              "string"
              "ivan"
            ]
            [
              "string"
              "2026-03-23 14:00:00"
            ]
            [
              "integer"
              0
            ]
            [
              "integer"
              15
            ]
            [
              "integer"
              2
            ]
            [
              "string"
              "ivan"
            ]
            [
              "string"
              "2026-03-23 14:00:00"
            ]
            [
              "integer"
              0
            ]
          ]
        ]
      ]
    ]
    [
      "namespace" => "App\Service"
      "short_class" => "UptimeBucketWriter"
      "class" => "App\Service\UptimeBucketWriter"
      "type" => "->"
      "function" => "upsertHourDeltas"
      "file" => "/var/www/src/Service/UptimeBucketWriter.php"
      "line" => 43
      "args" => [
        [
          "integer"
          2
        ]
        [
          "array"
          [
            [
              "array"
              [
                "asic_id" => [
                  "integer"
                  13
                ]
                "period_start" => [
                  "string"
                  "2026-03-23 14:00:00"
                ]
                "online" => [
                  "integer"
                  30
                ]
                "client_id" => [
                  "integer"
                  2
                ]
                "client_name" => [
                  "string"
                  "ivan"
                ]
              ]
            ]
            [
              "array"
              [
                "asic_id" => [
                  "integer"
                  1
                ]
                "period_start" => [
                  "string"
                  "2026-03-23 14:00:00"
                ]
                "online" => [
                  "integer"
                  30
                ]
                "client_id" => [
                  "integer"
                  2
                ]
                "client_name" => [
                  "string"
                  "ivan"
                ]
              ]
            ]
            [
              "array"
              [
                "asic_id" => [
                  "integer"
                  9
                ]
                "period_start" => [
                  "string"
                  "2026-03-23 14:00:00"
                ]
                "online" => [
                  "integer"
                  0
                ]
                "client_id" => [
                  "integer"
                  2
                ]
                "client_name" => [
                  "string"
                  "ivan"
                ]
              ]
            ]
            [
              "array"
              [
                "asic_id" => [
                  "integer"
                  16
                ]
                "period_start" => [
                  "string"
                  "2026-03-23 14:00:00"
                ]
                "online" => [
                  "integer"
                  0
                ]
                "client_id" => [
                  "integer"
                  2
                ]
                "client_name" => [
                  "string"
                  "ivan"
                ]
              ]
            ]
            [
              "array"
              [
                "asic_id" => [
                  "integer"
                  8
                ]
                "period_start" => [
                  "string"
                  "2026-03-23 14:00:00"
                ]
                "online" => [
                  "integer"
                  0
                ]
                "client_id" => [
                  "integer"
                  2
                ]
                "client_name" => [
                  "string"
                  "ivan"
                ]
              ]
            ]
            [
              "array"
              [
                "asic_id" => [
                  "integer"
                  15
                ]
                "period_start" => [
                  "string"
                  "2026-03-23 14:00:00"
                ]
                "online" => [
                  "integer"
                  0
                ]
                "client_id" => [
                  "integer"
                  2
                ]
                "client_name" => [
                  "string"
                  "ivan"
                ]
              ]
            ]
          ]
        ]
      ]
    ]
    [
      "namespace" => "App\Service"
      "short_class" => "UptimeBucketWriter"
      "class" => "App\Service\UptimeBucketWriter"
      "type" => "->"
      "function" => "addHourSamplesBulk"
      "file" => "/var/www/src/Controller/Api/AgentApiController.php"
      "line" => 304
      "args" => [
        [
          "integer"
          2
        ]
        [
          "array"
          [
            [
              "array"
              [
                "asic_id" => [
                  "integer"
                  13
                ]
                "period_start" => [
                  "string"
                  "2026-03-23 14:00:00"
                ]
                "online" => [
                  "integer"
                  30
                ]
                "client_id" => [
                  "integer"
                  2
                ]
                "client_name" => [
                  "string"
                  "ivan"
                ]
              ]
            ]
            [
              "array"
              [
                "asic_id" => [
                  "integer"
                  1
                ]
                "period_start" => [
                  "string"
                  "2026-03-23 14:00:00"
                ]
                "online" => [
                  "integer"
                  30
                ]
                "client_id" => [
                  "integer"
                  2
                ]
                "client_name" => [
                  "string"
                  "ivan"
                ]
              ]
            ]
            [
              "array"
              [
                "asic_id" => [
                  "integer"
                  9
                ]
                "period_start" => [
                  "string"
                  "2026-03-23 14:00:00"
                ]
                "online" => [
                  "integer"
                  0
                ]
                "client_id" => [
                  "integer"
                  2
                ]
                "client_name" => [
                  "string"
                  "ivan"
                ]
              ]
            ]
            [
              "array"
              [
                "asic_id" => [
                  "integer"
                  16
                ]
                "period_start" => [
                  "string"
                  "2026-03-23 14:00:00"
                ]
                "online" => [
                  "integer"
                  0
                ]
                "client_id" => [
                  "integer"
                  2
                ]
                "client_name" => [
                  "string"
                  "ivan"
                ]
              ]
            ]
            [
              "array"
              [
                "asic_id" => [
                  "integer"
                  8
                ]
                "period_start" => [
                  "string"
                  "2026-03-23 14:00:00"
                ]
                "online" => [
                  "integer"
                  0
                ]
                "client_id" => [
                  "integer"
                  2
                ]
                "client_name" => [
                  "string"
                  "ivan"
                ]
              ]
            ]
            [
              "array"
              [
                "asic_id" => [
                  "integer"
                  15
                ]
                "period_start" => [
                  "string"
                  "2026-03-23 14:00:00"
                ]
                "online" => [
                  "integer"
                  0
                ]
                "client_id" => [
                  "integer"
                  2
                ]
                "client_name" => [
                  "string"
                  "ivan"
                ]
              ]
            ]
          ]
        ]
        [
          "integer"
          1000
        ]
      ]
    ]
    [
      "namespace" => "App\Controller\Api"
      "short_class" => "AgentApiController"
      "class" => "App\Controller\Api\AgentApiController"
      "type" => "->"
      "function" => "samples"
      "file" => "/var/www/vendor/symfony/http-kernel/HttpKernel.php"
      "line" => 183
      "args" => [
        [
          "object"
          "Symfony\Component\HttpFoundation\Request"
        ]
      ]
    ]
    [
      "namespace" => "Symfony\Component\HttpKernel"
      "short_class" => "HttpKernel"
      "class" => "Symfony\Component\HttpKernel\HttpKernel"
      "type" => "->"
      "function" => "handleRaw"
      "file" => "/var/www/vendor/symfony/http-kernel/HttpKernel.php"
      "line" => 76
      "args" => [
        [
          "object"
          "Symfony\Component\HttpFoundation\Request"
        ]
        [
          "integer"
          1
        ]
      ]
    ]
    [
      "namespace" => "Symfony\Component\HttpKernel"
      "short_class" => "HttpKernel"
      "class" => "Symfony\Component\HttpKernel\HttpKernel"
      "type" => "->"
      "function" => "handle"
      "file" => "/var/www/vendor/symfony/http-kernel/Kernel.php"
      "line" => 182
      "args" => [
        [
          "object"
          "Symfony\Component\HttpFoundation\Request"
        ]
        [
          "integer"
          1
        ]
        [
          "boolean"
          true
        ]
      ]
    ]
    [
      "namespace" => "Symfony\Component\HttpKernel"
      "short_class" => "Kernel"
      "class" => "Symfony\Component\HttpKernel\Kernel"
      "type" => "->"
      "function" => "handle"
      "file" => "/var/www/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php"
      "line" => 35
      "args" => [
        [
          "object"
          "Symfony\Component\HttpFoundation\Request"
        ]
      ]
    ]
    [
      "namespace" => "Symfony\Component\Runtime\Runner\Symfony"
      "short_class" => "HttpKernelRunner"
      "class" => "Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner"
      "type" => "->"
      "function" => "run"
      "file" => "/var/www/vendor/autoload_runtime.php"
      "line" => 32
      "args" => []
    ]
    [
      "namespace" => ""
      "short_class" => ""
      "class" => ""
      "type" => ""
      "function" => "require_once"
      "file" => "/var/www/public/index.php"
      "line" => 5
      "args" => [
        [
          "string"
          "/var/www/vendor/autoload_runtime.php"
        ]
      ]
    ]
  ]
  -traceAsString: """
    #0 /var/www/vendor/doctrine/dbal/src/Connection.php(1460): Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert(Object(Doctrine\DBAL\Driver\PDO\Exception), Object(Doctrine\DBAL\Query))\n
    #1 /var/www/vendor/doctrine/dbal/src/Connection.php(1396): Doctrine\DBAL\Connection->handleDriverException(Object(Doctrine\DBAL\Driver\PDO\Exception), Object(Doctrine\DBAL\Query))\n
    #2 /var/www/vendor/doctrine/dbal/src/Connection.php(911): Doctrine\DBAL\Connection->convertExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDO\Exception), '\r\nINSERT INTO a...', Array, Array)\n
    #3 /var/www/src/Service/UptimeBucketWriter.php(94): Doctrine\DBAL\Connection->executeStatement('\r\nINSERT INTO a...', Array)\n
    #4 /var/www/src/Service/UptimeBucketWriter.php(43): App\Service\UptimeBucketWriter->upsertHourDeltas(2, Array)\n
    #5 /var/www/src/Controller/Api/AgentApiController.php(304): App\Service\UptimeBucketWriter->addHourSamplesBulk(2, Array, 1000)\n
    #6 /var/www/vendor/symfony/http-kernel/HttpKernel.php(183): App\Controller\Api\AgentApiController->samples(Object(Symfony\Component\HttpFoundation\Request))\n
    #7 /var/www/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)\n
    #8 /var/www/vendor/symfony/http-kernel/Kernel.php(182): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n
    #9 /var/www/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php(35): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))\n
    #10 /var/www/vendor/autoload_runtime.php(32): Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()\n
    #11 /var/www/public/index.php(5): require_once('/var/www/vendor...')\n
    #12 {main}
    """
  -class: "Doctrine\DBAL\Exception\NotNullConstraintViolationException"
  -statusCode: 500
  -statusText: "Internal Server Error"
  -headers: [
    "Vary" => "Accept"
    "X-Debug-Exception" => "An%20exception%20occurred%20while%20executing%20a%20query%3A%20SQLSTATE%5BHY000%5D%3A%20General%20error%3A%201364%20Field%20%27expected_seconds%27%20doesn%27t%20have%20a%20default%20value"
    "X-Debug-Exception-File" => "%2Fvar%2Fwww%2Fvendor%2Fdoctrine%2Fdbal%2Fsrc%2FDriver%2FAPI%2FMySQL%2FExceptionConverter.php:101"
    "Content-Type" => "application/json"
  ]
  -file: "/var/www/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php"
  -line: 101
  -asString: "{"type":"https:\/\/tools.ietf.org\/html\/rfc2616#section-10","title":"An error occurred","status":500,"detail":"An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'expected_seconds' doesn't have a default value","class":"Doctrine\\DBAL\\Exception\\NotNullConstraintViolationException","trace":[{"namespace":"","short_class":"","class":"","type":"","function":"","file":"\/var\/www\/vendor\/doctrine\/dbal\/src\/Driver\/API\/MySQL\/ExceptionConverter.php","line":101,"args":[]},{"namespace":"Doctrine\\DBAL\\Driver\\API\\MySQL","short_class":"ExceptionConverter","class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->","function":"convert","file":"\/var\/www\/vendor\/doctrine\/dbal\/src\/Connection.php","line":1460,"args":[["object","Doctrine\\DBAL\\Driver\\PDO\\Exception"],["object","Doctrine\\DBAL\\Query"]]},{"namespace":"Doctrine\\DBAL","short_class":"Connection","class":"Doctrine\\DBAL\\Connection","type":"->","function":"handleDriverException","file":"\/var\/www\/vendor\/doctrine\/dbal\/src\/Connection.php","line":1396,"args":[["object","Doctrine\\DBAL\\Driver\\PDO\\Exception"],["object","Doctrine\\DBAL\\Query"]]},{"namespace":"Doctrine\\DBAL","short_class":"Connection","class":"Doctrine\\DBAL\\Connection","type":"->","function":"convertExceptionDuringQuery","file":"\/var\/www\/vendor\/doctrine\/dbal\/src\/Connection.php","line":911,"args":[["object","Doctrine\\DBAL\\Driver\\PDO\\Exception"],["string","\r\nINSERT INTO asic_uptime_bucket\r\n(location_id, asic_id, client_id, client_name, granularity, period_start, online_seconds, updated_at)\r\nSELECT\r\n  ? AS location_id,\r\n  d.asic_id,\r\n  d.client_id,\r\n  d.client_name,\r\n  'hour' AS granularity,\r\n  d.period_start,\r\n  d.online,\r\n  ? AS updated_at\r\nFROM (\r\n  SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online\r\n) d\r\nON DUPLICATE KEY UPDATE\r\n  online_seconds   = asic_uptime_bucket.online_seconds + VALUES(online_seconds),\r\n  updated_at       = VALUES(updated_at),\r\n  client_name      = VALUES(client_name)\r\n"],["array",[["integer",2],["string","2026-03-23 14:18:04"],["integer",13],["integer",2],["string","ivan"],["string","2026-03-23 14:00:00"],["integer",30],["integer",1],["integer",2],["string","ivan"],["string","2026-03-23 14:00:00"],["integer",30],["integer",9],["integer",2],["string","ivan"],["string","2026-03-23 14:00:00"],["integer",0],["integer",16],["integer",2],["string","ivan"],["string","2026-03-23 14:00:00"],["integer",0],["integer",8],["integer",2],["string","ivan"],["string","2026-03-23 14:00:00"],["integer",0],["integer",15],["integer",2],["string","ivan"],["string","2026-03-23 14:00:00"],["integer",0]]],["array",[]]]},{"namespace":"Doctrine\\DBAL","short_class":"Connection","class":"Doctrine\\DBAL\\Connection","type":"->","function":"executeStatement","file":"\/var\/www\/src\/Service\/UptimeBucketWriter.php","line":94,"args":[["string","\r\nINSERT INTO asic_uptime_bucket\r\n(location_id, asic_id, client_id, client_name, granularity, period_start, online_seconds, updated_at)\r\nSELECT\r\n  ? AS location_id,\r\n  d.asic_id,\r\n  d.client_id,\r\n  d.client_name,\r\n  'hour' AS granularity,\r\n  d.period_start,\r\n  d.online,\r\n  ? AS updated_at\r\nFROM (\r\n  SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online\r\n) d\r\nON DUPLICATE KEY UPDATE\r\n  online_seconds   = asic_uptime_bucket.online_seconds + VALUES(online_seconds),\r\n  updated_at       = VALUES(updated_at),\r\n  client_name      = VALUES(client_name)\r\n"],["array",[["integer",2],["string","2026-03-23 14:18:04"],["integer",13],["integer",2],["string","ivan"],["string","2026-03-23 14:00:00"],["integer",30],["integer",1],["integer",2],["string","ivan"],["string","2026-03-23 14:00:00"],["integer",30],["integer",9],["integer",2],["string","ivan"],["string","2026-03-23 14:00:00"],["integer",0],["integer",16],["integer",2],["string","ivan"],["string","2026-03-23 14:00:00"],["integer",0],["integer",8],["integer",2],["string","ivan"],["string","2026-03-23 14:00:00"],["integer",0],["integer",15],["integer",2],["string","ivan"],["string","2026-03-23 14:00:00"],["integer",0]]]]},{"namespace":"App\\Service","short_class":"UptimeBucketWriter","class":"App\\Service\\UptimeBucketWriter","type":"->","function":"upsertHourDeltas","file":"\/var\/www\/src\/Service\/UptimeBucketWriter.php","line":43,"args":[["integer",2],["array",[["array",{"asic_id":["integer",13],"period_start":["string","2026-03-23 14:00:00"],"online":["integer",30],"client_id":["integer",2],"client_name":["string","ivan"]}],["array",{"asic_id":["integer",1],"period_start":["string","2026-03-23 14:00:00"],"online":["integer",30],"client_id":["integer",2],"client_name":["string","ivan"]}],["array",{"asic_id":["integer",9],"period_start":["string","2026-03-23 14:00:00"],"online":["integer",0],"client_id":["integer",2],"client_name":["string","ivan"]}],["array",{"asic_id":["integer",16],"period_start":["string","2026-03-23 14:00:00"],"online":["integer",0],"client_id":["integer",2],"client_name":["string","ivan"]}],["array",{"asic_id":["integer",8],"period_start":["string","2026-03-23 14:00:00"],"online":["integer",0],"client_id":["integer",2],"client_name":["string","ivan"]}],["array",{"asic_id":["integer",15],"period_start":["string","2026-03-23 14:00:00"],"online":["integer",0],"client_id":["integer",2],"client_name":["string","ivan"]}]]]]},{"namespace":"App\\Service","short_class":"UptimeBucketWriter","class":"App\\Service\\UptimeBucketWriter","type":"->","function":"addHourSamplesBulk","file":"\/var\/www\/src\/Controller\/Api\/AgentApiController.php","line":304,"args":[["integer",2],["array",[["array",{"asic_id":["integer",13],"period_start":["string","2026-03-23 14:00:00"],"online":["integer",30],"client_id":["integer",2],"client_name":["string","ivan"]}],["array",{"asic_id":["integer",1],"period_start":["string","2026-03-23 14:00:00"],"online":["integer",30],"client_id":["integer",2],"client_name":["string","ivan"]}],["array",{"asic_id":["integer",9],"period_start":["string","2026-03-23 14:00:00"],"online":["integer",0],"client_id":["integer",2],"client_name":["string","ivan"]}],["array",{"asic_id":["integer",16],"period_start":["string","2026-03-23 14:00:00"],"online":["integer",0],"client_id":["integer",2],"client_name":["string","ivan"]}],["array",{"asic_id":["integer",8],"period_start":["string","2026-03-23 14:00:00"],"online":["integer",0],"client_id":["integer",2],"client_name":["string","ivan"]}],["array",{"asic_id":["integer",15],"period_start":["string","2026-03-23 14:00:00"],"online":["integer",0],"client_id":["integer",2],"client_name":["string","ivan"]}]]],["integer",1000]]},{"namespace":"App\\Controller\\Api","short_class":"AgentApiController","class":"App\\Controller\\Api\\AgentApiController","type":"->","function":"samples","file":"\/var\/www\/vendor\/symfony\/http-kernel\/HttpKernel.php","line":183,"args":[["object","Symfony\\Component\\HttpFoundation\\Request"]]},{"namespace":"Symfony\\Component\\HttpKernel","short_class":"HttpKernel","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->","function":"handleRaw","file":"\/var\/www\/vendor\/symfony\/http-kernel\/HttpKernel.php","line":76,"args":[["object","Symfony\\Component\\HttpFoundation\\Request"],["integer",1]]},{"namespace":"Symfony\\Component\\HttpKernel","short_class":"HttpKernel","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->","function":"handle","file":"\/var\/www\/vendor\/symfony\/http-kernel\/Kernel.php","line":182,"args":[["object","Symfony\\Component\\HttpFoundation\\Request"],["integer",1],["boolean",true]]},{"namespace":"Symfony\\Component\\HttpKernel","short_class":"Kernel","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->","function":"handle","file":"\/var\/www\/vendor\/symfony\/runtime\/Runner\/Symfony\/HttpKernelRunner.php","line":35,"args":[["object","Symfony\\Component\\HttpFoundation\\Request"]]},{"namespace":"Symfony\\Component\\Runtime\\Runner\\Symfony","short_class":"HttpKernelRunner","class":"Symfony\\Component\\Runtime\\Runner\\Symfony\\HttpKernelRunner","type":"->","function":"run","file":"\/var\/www\/vendor\/autoload_runtime.php","line":32,"args":[]},{"namespace":"","short_class":"","class":"","type":"","function":"require_once","file":"\/var\/www\/public\/index.php","line":5,"args":[["string","\/var\/www\/vendor\/autoload_runtime.php"]]}]}"
  -dataRepresentation: ? Symfony\Component\VarDumper\Cloner\Data
}
Format: json
Show context
[
  "exception" => Doctrine\DBAL\Exception\NotNullConstraintViolationException {#750
    #message: "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'expected_seconds' doesn't have a default value"
    #code: 1364
    #file: "/var/www/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php"
    #line: 101
    -previous: Doctrine\DBAL\Driver\PDO\Exception {#746 …}
    -query: Doctrine\DBAL\Query {#748 …}
    trace: {
      /var/www/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:101 {
        Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert(Exception $exception, ?Query $query): DriverException …
        › 1364,1566 => new NotNullConstraintViolationException($exception, $query),default => new DriverException($exception, $query),
      }
      /var/www/vendor/doctrine/dbal/src/Connection.php:1460 {
        Doctrine\DBAL\Connection->handleDriverException(Exception $driverException, ?Query $query): DriverException …
        › $this->exceptionConverter ??= $this->driver->getExceptionConverter();$exception                  = $this->exceptionConverter->convert($driverException, $query);arguments: {
          $exception: Doctrine\DBAL\Driver\PDO\Exception {#746 …}
          $query: Doctrine\DBAL\Query {#748 …}
        }
      }
      /var/www/vendor/doctrine/dbal/src/Connection.php:1396 {
        Doctrine\DBAL\Connection->convertExceptionDuringQuery(Exception $e, string $sql, array $params = [], array $types = []): DriverException …
        › ): DriverException {    return $this->handleDriverException($e, new Query($sql, $params, $types));}
        arguments: {
          $driverException: Doctrine\DBAL\Driver\PDO\Exception {#746 …}
          $query: Doctrine\DBAL\Query {#748 …}
        }
      }
      /var/www/vendor/doctrine/dbal/src/Connection.php:911 {
        Doctrine\DBAL\Connection->executeStatement(string $sql, array $params = [], array $types = []): string|int …
        › } catch (Driver\Exception $e) {    throw $this->convertExceptionDuringQuery($e, $sql, $params, $types);}
        arguments: {
          $e: Doctrine\DBAL\Driver\PDO\Exception {#746 …}
          $sql: """
            \r\n
            INSERT INTO asic_uptime_bucket\r\n
            (location_id, asic_id, client_id, client_name, granularity, period_start, online_seconds, updated_at)\r\n
            SELECT\r\n
              ? AS location_id,\r\n
              d.asic_id,\r\n
              d.client_id,\r\n
              d.client_name,\r\n
              'hour' AS granularity,\r\n
              d.period_start,\r\n
              d.online,\r\n
              ? AS updated_at\r\n
            FROM (\r\n
              SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online\r\n
            ) d\r\n
            ON DUPLICATE KEY UPDATE\r\n
              online_seconds   = asic_uptime_bucket.online_seconds + VALUES(online_seconds),\r\n
              updated_at       = VALUES(updated_at),\r\n
              client_name      = VALUES(client_name)\r\n
            """
          $params: [ …32]
          $types: []
        }
      }
      /var/www/src/Service/UptimeBucketWriter.php:94 {
        App\Service\UptimeBucketWriter->upsertHourDeltas(int $locationId, array $rows): void …
        › \r    $this->conn->executeStatement($sql, $params);\r}\r
        arguments: {
          $sql: """
            \r\n
            INSERT INTO asic_uptime_bucket\r\n
            (location_id, asic_id, client_id, client_name, granularity, period_start, online_seconds, updated_at)\r\n
            SELECT\r\n
              ? AS location_id,\r\n
              d.asic_id,\r\n
              d.client_id,\r\n
              d.client_name,\r\n
              'hour' AS granularity,\r\n
              d.period_start,\r\n
              d.online,\r\n
              ? AS updated_at\r\n
            FROM (\r\n
              SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online UNION ALL SELECT ? AS asic_id, ? AS client_id, ? AS client_name, ? AS period_start, ? AS online\r\n
            ) d\r\n
            ON DUPLICATE KEY UPDATE\r\n
              online_seconds   = asic_uptime_bucket.online_seconds + VALUES(online_seconds),\r\n
              updated_at       = VALUES(updated_at),\r\n
              client_name      = VALUES(client_name)\r\n
            """
          $params: [ …32]
        }
      }
      /var/www/src/Service/UptimeBucketWriter.php:43 {
        App\Service\UptimeBucketWriter->addHourSamplesBulk(int $locationId, array $deltas, int $chunkSize = 1000): void …
        › foreach (array_chunk($deltas, $chunkSize) as $chunk) {\r    $this->upsertHourDeltas($locationId, $chunk);\r}\r
        arguments: {
          $locationId: 2
          $rows: [ …6]
        }
      }
      /var/www/src/Controller/Api/AgentApiController.php:304 {
        App\Controller\Api\AgentApiController->samples(Request $req): JsonResponse …
        › if ($bucketDeltas !== []) {\r    $this->bucketWriter->addHourSamplesBulk(\r        locationId: $location->getId(),\r
        arguments: {
          $locationId: 2
          $deltas: [ …6]
          $chunkSize: 1000
        }
      }
      /var/www/vendor/symfony/http-kernel/HttpKernel.php:183 {
        Symfony\Component\HttpKernel\HttpKernel->handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response …
        › // call controller$response = $controller(...$arguments);arguments: {
          $req: Symfony\Component\HttpFoundation\Request {#2 …}
        }
      }
      /var/www/vendor/symfony/http-kernel/HttpKernel.php:76 {
        Symfony\Component\HttpKernel\HttpKernel->handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response …
        › try {    return $response = $this->handleRaw($request, $type);} catch (\Throwable $e) {
        arguments: {
          $request: Symfony\Component\HttpFoundation\Request {#2 …}
          $type: 1
        }
      }
      /var/www/vendor/symfony/http-kernel/Kernel.php:182 {
        Symfony\Component\HttpKernel\Kernel->handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response …
        › try {    return $this->getHttpKernel()->handle($request, $type, $catch);} finally {
        arguments: {
          $request: Symfony\Component\HttpFoundation\Request {#2 …}
          $type: 1
          $catch: true
        }
      }
      /var/www/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35 {
        Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run(): int …
        › {    $response = $this->kernel->handle($this->request);arguments: {
          $request: Symfony\Component\HttpFoundation\Request {#2 …}
        }
      }
      /var/www/vendor/autoload_runtime.php:32 {
        require_once …
        ›         ->getRunner($app)        ->run());
      }
      /var/www/public/index.php:5 {\rrequire_once dirname(__DIR__).'/vendor/autoload_runtime.php';\r\r
        arguments: {
          "/var/www/vendor/autoload_runtime.php"
        }
      }
    }
  }
  "debug" => true
]
ProblemNormalizer (0.01 ms) JsonEncoder (0.10 ms) 0.32 ms

deserialize 0

Nothing was deserialized.

normalize 0

Nothing was normalized.

denormalize 0

Nothing was denormalized.

encode 0

Nothing was encoded.

decode 0

Nothing was decoded.