Hallo,

was ist aus diesem Thema eigentlich geworden?
Scheinbar bin ich von einem ähnlichen Problem betroffen:
- Ich habe gestern meine bis dahin laufende volkszäher Installation mit ‚git pull‘ auf den master aktualisiert (und habe das Kommando heute noch mal wiederholt, um sicherzugehen, dass ich den letzten Stand mit Andis gestern commiteten Fix habe).
- Seitdem sind die Datenbankabfragen (mysql) für die Darstellung extrem zäh. Die Abfrage eines Kanals für 24h dauert im Minutenbereich statt 1 Sekunde wie vorher. Auf meinem Xeon-Server sind dabei 5 Kerne zu 100% ausgelastet und dass bei eingeschalteter Aggregation.

Ich habe mal eine Abfrage (1 Kanal für 24h) mit &debug=1 ausgeführt, hier ist der interessante debug-Anteil der Ausgabe:

"debug": {
		"level": "1",
		"database": "pdo_mysql",
		"time": 361.22724,
		"uptime": 257587080,
		"load": [
			3.46,
			3.78,
			3.01
		],
		"commit-hash": "bfff72a54514d970c7cea395dff256c330f0c61a",
		"php-version": "5.6.4-4ubuntu6.3",
		"messages": [],
		"sql": {
			"totalTime": 361.13634586334,
			"worstTime": 360.98874211311,
			"queries": [
				{
					"sql": "SELECT e0_.id AS id0, e0_.uuid AS uuid1, e0_.type AS type2, p1_.id AS id3, p1_.pkey AS pkey4, p1_.value AS value5, e0_.class AS class6, p1_.entity_id AS entity_id7 FROM entities e0_ LEFT JOIN properties p1_ ON e0_.id = p1_.entity_id WHERE (e0_.uuid = ?) AND e0_.class IN ('channel', 'aggregator') ORDER BY p1_.pkey ASC",
					"params": [
						"7d0f4340-fbec-11e0-84ed-bf024c4c5d69"
					],
					"types": [
						2
					],
					"executionMS": 0.00047087669372559
				},
				{
					"sql": "SELECT MAX(timestamp) FROM data WHERE channel_id=? AND timestamp < (SELECT MAX(timestamp) FROM data WHERE channel_id=? AND timestamp<?)",
					"params": [
						6,
						6,
						1444593967785
					],
					"types": [],
					"executionMS": 360.98874211311
				},
				{
					"sql": "SELECT MIN(timestamp) FROM data WHERE channel_id=? AND timestamp>?",
					"params": [
						6,
						1444680367785
					],
					"types": [],
					"executionMS": 0.027281045913696
				},
				{
					"sql": "SELECT aggregate.type, COUNT(aggregate.id) AS count FROM aggregate INNER JOIN entities ON aggregate.channel_id = entities.id WHERE uuid = ? GROUP BY type HAVING count > 0 ORDER BY type DESC",
					"params": [
						"7d0f4340-fbec-11e0-84ed-bf024c4c5d69"
					],
					"types": [],
					"executionMS": 0.062636852264404
				},
				{
					"sql": "SELECT UNIX_TIMESTAMP(FROM_UNIXTIME(MIN(timestamp) \/ 1000, \"%Y-%m-%d\")) * 1000 FROM aggregate WHERE channel_id=? AND type=? AND timestamp >= UNIX_TIMESTAMP(DATE_ADD(FROM_UNIXTIME(? \/ 1000, \"%Y-%m-%d\"), INTERVAL 1 day)) * 1000",
					"params": [
						6,
						3,
						1444593884564
					],
					"types": [],
					"executionMS": 0.0002899169921875
				},
				{
					"sql": "SELECT UNIX_TIMESTAMP(DATE_ADD(FROM_UNIXTIME(MAX(timestamp) \/ 1000, \"%Y-%m-%d\"), INTERVAL 1 day)) * 1000 FROM aggregate WHERE channel_id=? AND type=? AND timestamp<?",
					"params": [
						6,
						3,
						1444680400937
					],
					"types": [],
					"executionMS": 0.0001380443572998
				},
				{
					"sql": "SELECT COUNT(1) FROM data WHERE channel_id = ? AND timestamp >= ? AND timestamp <= ?",
					"params": [
						6,
						1444593884564,
						1444680400937
					],
					"types": [],
					"executionMS": 0.03215503692627
				},
				{
					"sql": "SELECT timestamp, value, 1 AS count FROM data WHERE channel_id=? AND timestamp >= ? AND timestamp <= ? ORDER BY timestamp ASC",
					"params": [
						6,
						1444593884564,
						1444680400937
					],
					"types": [],
					"executionMS": 0.024631977081299
				}
			]
		}
	}
Greetinx,
Udo

Am 12.09.2015 um 16:13 schrieb G. Stenzel <gs-...@betriebsdirektor.de>:

Alles klar.
Vielen Dank!

Ich gehe mal davon aus, dass der RPi auch an der FritzBox hängt. Dann
ist es recht einfach:
Du loggst dich in die FritzBox ein.
Gehst auf Internet/Freigaben/Neue Portfreigabe.
Dann erstellst du eine Portfreigabe für HTTP-Server an Computer
'RaspberryPi' ( oder wie auch immer der in deinem Netz heißt), an
IP-Adresse 'IP des Raspberry in deinem Netz' und klickst ok.
Per PN teilst du Andi dann mit: deine Internetadresse/IP-des Raspberry.
Deine Internetadresse findest du im Menue-Punkt: Internet, die IP des
Raspberry wirst du kennen.

Gruß
Udo


Am 12.09.2015 um 15:29 schrieb G. Stenzel:
Ja.

Am 12.09.2015 um 14:56 schrieb G. Stenzel:
Wie eine temporäre Freigabe meines Systemsnach außen eingerichtet
werden kann, weiß ich momentan nicht.
Gehst du über eine FritzBox ins Internet?

Gruß
Udo

Antwort per Email an