[vz-users] aggregate error minute level

Andreas Götz cpuidle at gmail.com
Thu Jul 4 08:49:38 CEST 2019


Kannst Du das Kommando bitte nochmal mit -v ausführen damit ich den Verursacher der Fehlermeldung sehr?

Wäre es evtl möglich mir einen Dump Deiner DB zukommen zu lassen? Was für eine DB ist das?

Viele Grüße,
Andreas

> Am 04.07.2019 um 08:25 schrieb Christian S <schnellrieder.cs at gmail.com>:
> 
> 
> Hallo.
> 
> Seit Tagen bekomme ich beim Ausführen von "aggregate" immer einen Fehler (nur auf dem Level "minute").
> In den Log Files hätte ich jetzt nichts gefunden. Unten der Fehler im Detail aber so richtig schlau werde ich nicht daraus.
> 
> Grüße
> 
> root at service-uplink:/home/nas# php /var/www/volkszaehler.org/bin/aggregate run -m delta -l minute
> Performing 'delta' aggregation on 'minute' level
> 
>  [>---------------------------]   0%  < 1 sec/< 1 sec  0 channels
>  [===>------------------------]  11%  < 1 sec/< 1 sec  1 channels
>  [======>---------------------]  22%  < 1 sec/< 1 sec  2 channels
>  [=========>------------------]  33%  < 1 sec/< 1 sec  3 channels
>  [============>---------------]  44%  < 1 sec/< 1 sec  4 channels
> In AbstractMySQLDriver.php line 106:
> 
>   An exception occurred while executing 'REPLACE INTO aggregate (channel_id, type, timestamp, value, count) SELECT channel_
>   id, ? AS type, MAX(agg.timestamp) AS timestamp, COALESCE( SUM(agg.val_by_time) / (MAX(agg.timestamp) - MIN(agg.prev_times
>   tamp)), AVG(agg.value)) AS value, COUNT(agg.value) AS count FROM ( SELECT channel_id, timestamp, value, value * (timestam
>   p - @prev_timestamp) AS val_by_time, COALESCE(@prev_timestamp, 0) AS prev_timestamp, @prev_timestamp := timestamp FROM da
>   ta CROSS JOIN (SELECT @prev_timestamp := UNIX_TIMESTAMP(DATE_ADD(FROM_UNIXTIME(MAX(timestamp) / 1000, "%Y-%m-%d %H:%i:00"
>   ), INTERVAL 1 minute)) * 1000 FROM aggregate WHERE type = ? AND aggregate.channel_id = ?) AS vars WHERE channel_id = ? AN
>   D timestamp >= IFNULL((SELECT UNIX_TIMESTAMP(DATE_ADD(FROM_UNIXTIME(MAX(timestamp) / 1000, "%Y-%m-%d %H:%i:00"), INTERVAL
>    1 minute)) * 1000 FROM aggregate WHERE type = ? AND aggregate.channel_id = ? ), 0) AND timestamp < UNIX_TIMESTAMP(DATE_F
>   ORMAT(NOW(), "%Y-%m-%d %H:%i:00")) * 1000 ) AS agg GROUP BY channel_id, YEAR(FROM_UNIXTIME(timestamp/1000)), DAYOFYEAR(FR
>   OM_UNIXTIME(timestamp/1000)), HOUR(FROM_UNIXTIME(timestamp/1000)), MINUTE(FROM_UNIXTIME(timestamp/1000))' with params [1,
>    1, "19", "19", 1, "19"]:
> 
>   SQLSTATE[22012]: Division by zero: 1365 Division by 0
> 
> 
> In PDOStatement.php line 119:
> 
>   SQLSTATE[22012]: Division by zero: 1365 Division by 0
> 
> 
> In PDOStatement.php line 117:
> 
>   SQLSTATE[22012]: Division by zero: 1365 Division by 0
> 
> 
> run [-l|--level LEVEL] [-m|--mode MODE] [-p|--periods PERIODS] [-v|--verbose] [--] [<uuid>...]
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20190704/eca2e850/attachment.html>


More information about the volkszaehler-users mailing list