PHP-FPM 504 Gateway timeout

Denny

B1G-Software-Kunde
#1
Moin Jung,

hat einer auch diese Gateway timeouts beim Löschen sehr großer Postfächer mit mahr als 6 GB und 150.000 mails?

(70007)The timeout specified has expired

Bei Ngix kann man wohl den proxy Timeout hochstellen aber bei apache wohl nicht?
 

SLM

B1G-Software-Kunde
#2
Irgendwann bricht jeder Prozess wegen der Laufzeit mal ab. Das Löschen von derart großen Daten- und Dateimengen kann das System nicht. das gleiche Problem hatte ich schon vor ein paar Jahren.
 

Denny

B1G-Software-Kunde
#3
Code:
Wed, 06 Nov 2019 13:46:18 +0100 [4]: (db.class.php:183) MySQL-Error at '/var/www/web0/htdocs/interface/pipe.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET mailspace_used=mailspace_used+13958 WHERE id='42559''
Wed, 06 Nov 2019 13:46:18 +0100 [4]: (db.class.php:183) MySQL-Error at '/var/www/web0/htdocs/interface/pipe.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET received_mails=received_mails+'1' WHERE id='42679''
Wed, 06 Nov 2019 13:46:18 +0100 [4]: (db.class.php:183) MySQL-Error at '/email.compose.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE mail='135391083''
Wed, 06 Nov 2019 13:46:19 +0100 [4]: (db.class.php:183) MySQL-Error at '/email.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET last_notify='1573044328' WHERE id='184445''
Wed, 06 Nov 2019 13:46:19 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET traffic_down=0,traffic_up=0,traffic_status='11' WHERE traffic_status!='11''
Wed, 06 Nov 2019 13:46:19 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE date<1570365928'
Wed, 06 Nov 2019 13:46:19 +0100 [4]: (db.class.php:183) MySQL-Error at '/var/www/web0/htdocs/interface/pipe.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET mailbox_generation=mailbox_generation+1 WHERE id='16974''
Wed, 06 Nov 2019 14:49:34 +0100 [4]: (db.class.php:183) MySQL-Error at '/admin/users.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE user='238220''
Wed, 06 Nov 2019 14:49:39 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE date<1570369728'
Wed, 06 Nov 2019 14:49:40 +0100 [4]: (db.class.php:183) MySQL-Error at '/admin/users.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE user='181620''
Wed, 06 Nov 2019 14:50:12 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE date<1570369761'
Wed, 06 Nov 2019 21:23:53 +0100 [1]: (mailbox.class.php:1844) Breaking S/MIME processing loop for message 135404289 (this should not happen)
Wed, 06 Nov 2019 23:44:23 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE date<1570401811'
Wed, 06 Nov 2019 23:45:09 +0100 [4]: (db.class.php:183) MySQL-Error at '/email.compose.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE mail='135407035''
Wed, 06 Nov 2019 23:45:13 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET traffic_down=0,traffic_up=0,traffic_status='11' WHERE traffic_status!='11''
Wed, 06 Nov 2019 23:45:30 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE date<1570401878'
Wed, 06 Nov 2019 23:46:01 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE date<1570401910'
Wed, 06 Nov 2019 23:46:04 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET traffic_down=0,traffic_up=0,traffic_status='11' WHERE traffic_status!='11''
Wed, 06 Nov 2019 23:46:16 +0100 [4]: (db.class.php:183) MySQL-Error at '/email.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE mail='135406846''
Wed, 06 Nov 2019 23:46:38 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE date<1570401947'
Wed, 06 Nov 2019 23:46:47 +0100 [4]: (db.class.php:183) MySQL-Error at '/email.compose.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE mail='135407038''
Wed, 06 Nov 2019 23:46:52 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET traffic_down=0,traffic_up=0,traffic_status='11' WHERE traffic_status!='11''
Wed, 06 Nov 2019 23:46:55 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET traffic_down=0,traffic_up=0,traffic_status='11' WHERE traffic_status!='11''
Wed, 06 Nov 2019 23:47:29 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE date<1570401998'
Wed, 06 Nov 2019 23:47:46 +0100 [4]: (db.class.php:183) MySQL-Error at '/email.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET last_notify='1573080415' WHERE id='1612''
Wed, 06 Nov 2019 23:47:46 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET traffic_down=0,traffic_up=0,traffic_status='11' WHERE traffic_status!='11''
Wed, 06 Nov 2019 23:48:15 +0100 [4]: (db.class.php:183) MySQL-Error at '/email.compose.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE mail='135407052''
Wed, 06 Nov 2019 23:48:37 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE date<1570402066'
Wed, 06 Nov 2019 23:48:37 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET traffic_down=0,traffic_up=0,traffic_status='11' WHERE traffic_status!='11''
Wed, 06 Nov 2019 23:49:16 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE date<1570402105'
Wed, 06 Nov 2019 23:49:59 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE date<1570402149'
Wed, 06 Nov 2019 23:50:19 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET traffic_down=0,traffic_up=0,traffic_status='11' WHERE traffic_status!='11''
Wed, 06 Nov 2019 23:50:37 +0100 [4]: (db.class.php:183) MySQL-Error at '/admin/users.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE user='56468''
Wed, 06 Nov 2019 23:50:57 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE date<1570402206'
Wed, 06 Nov 2019 23:51:11 +0100 [4]: (db.class.php:183) MySQL-Error at '/var/www/web0/htdocs/interface/pipe.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET mailspace_used=mailspace_used+13936 WHERE id='19634''
Wed, 06 Nov 2019 23:51:11 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET traffic_down=0,traffic_up=0,traffic_status='11' WHERE traffic_status!='11''
Wed, 06 Nov 2019 23:51:28 +0100 [4]: (db.class.php:183) MySQL-Error at '/admin/users.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE user='55700''
Wed, 06 Nov 2019 23:52:01 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET traffic_down=0,traffic_up=0,traffic_status='11' WHERE traffic_status!='11''
Wed, 06 Nov 2019 23:52:02 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE date<1570402271'
Wed, 06 Nov 2019 23:52:54 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'UPDATE bm60_users SET traffic_down=0,traffic_up=0,traffic_status='11' WHERE traffic_status!='11''
Wed, 06 Nov 2019 23:52:54 +0100 [4]: (db.class.php:183) MySQL-Error at '/cron.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE date<1570402322'
Wed, 06 Nov 2019 23:52:54 +0100 [4]: (db.class.php:183) MySQL-Error at '/admin/users.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE user='55188''
Wed, 06 Nov 2019 23:52:55 +0100 [4]: (db.class.php:183) MySQL-Error at '/email.compose.php': 'Lock wait timeout exceeded; try restarting transaction', tried to execute 'DELETE FROM bm60_certmails WHERE mail='135407075''
 

Denny

B1G-Software-Kunde
#4
Das ist nur ein Auszug der Fehler von gestern, nun muss ich sagen, das ich gestern fast 20.000 Benutzer mit 10 Tabs gelöscht habe fast 150 GB an Daten sind nun wieder verfügbar aber die Session läuft öfters ab, keine Ahnung warum, es scheint wohl das die Datenbank irgendwann dicht macht...
Gerade das mit dem Cron darf aber nicht passieren, ich lese auch viel mit certmails, ab und an
Breaking S/MIME processing loop for message xyz. Ich werde es nun erstmal mit
Code:
SET GLOBAL innodb_lock_wait_timeout = 120;
Leistung ist ja genug da, die Serverhardware schläft ja noch ab und an mal einen load von 8 bei 10 gleichzeitigen Löschoperationen von jeweils 1500 Benutzern :D
 
Last edited:

bcmAlex

B1G-Software-Kunde
#5
Das ist nur ein Auszug der Fehler von gestern, nun muss ich sagen, das ich gestern fast 20.000 Benutzer mit 10 Tabs gelöscht habe fast 150 GB an Daten sind nun wieder verfügbar aber die Session läuft öfters ab, keine Ahnung warum, es scheint wohl das die Datenbank irgendwann dicht macht...
Gerade das mit dem Cron darf aber nicht passieren, ich lese auch viel mit certmails, ab und an
Breaking S/MIME processing loop for message xyz. Ich werde es nun erstmal mit
Code:
SET GLOBAL innodb_lock_wait_timeout = 120;
Leistung ist ja genug da, die Serverhardware schläft ja noch ab und an mal einen load von 8 bei 10 gleichzeitigen Löschoperationen von jeweils 1500 Benutzern :D
20.000 ?? Stolze Menge 😅
 

Denny

B1G-Software-Kunde
#7
20.000 ?? Stolze Menge 😅
muss noch 150.000 löschen :D und das ist mein kleiner Dienst bei dem anderen sind es knapp 600.000 die inaktiv sind, ich habe keine Ahnung wie ich das machen soll :-(

Die gleichen Fehler haben wir auch öfters: https://board.b1gmail.com/threads/lock-wait-timeout-exceeded-try-restarting-transaction.16414/

- Lock wait timeout exceeded; try restarting transaction
- Breaking S/MIME processing loop for message

Auch bei uns ist die Hardware eigentlich gut aufgestellt und werkelt normalerweise so vor sich hin. Deshalb ist es auch schwer, die Ursachen dafür rauszufinden.
Schau mal wie oft CERTMAILS vorkommt und ich habe auch viele Joins ohne Index, die brauchen wohl auch lange. Bei mir werden 65% der MYSQL Temp tables auf der Platte gespeichert, bei b1gmail7.2 waren das noch 28%...schon ne Menge
 

SLM

B1G-Software-Kunde
#8
Breaking S/MIME processing loop for message kommt mittlerweile täglich und auch mehrfach vor.

Mir stellt sich halt die Frage, ob es ein Scriptproblem ist oder eher im Bereich MySQL-Konfiguration anzusiedeln ist.
 
Top