# MySQL Server Probleme



## Patric (25. März 2013)

Hallo zusammen,

ich betreibe auf meinem Server mehrere Websites, Gameserver, Teamspeak-Server, etc...

Alle dies MySQL basierend. Seit ca. einer Woche scheint es so zu sein, dass Websites einfach nur noch in den Tod laden & alles MySQL basierenden Dienste nicht mehr korrekt Arbeiten.

Hier einige Logs dazu: 

Mail:
	
	



```
Mar 24 10:56:01 server1 amavis[26126]: (26126-19) (!!)TROUBLE in  process_request: connect_to_sql: unable to connect to any dataset at  (eval 103) line 241, <GEN332> line 4. at (eval 104) line 280,  <GEN332> line 4.
Mar 24 10:56:01 server1 amavis[26871]: (26871-19) (!!)TROUBLE in  process_request: connect_to_sql: unable to connect to any dataset at  (eval 103) line 241, <GEN323> line 4. at (eval 104) line 280,  <GEN323> line 4.
Mar 24 10:56:01 server1 postfix/smtp[25976]: fatal:  mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table  lookup problem
Mar 24 10:56:02 server1 postfix/smtp[26049]: fatal:  mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table  lookup problem
Mar 24 10:56:03 server1 postfix/error[26053]: fatal:  mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table  lookup problem
Mar 24 10:56:03 server1 postfix/error[26054]: fatal:  mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table  lookup problem
Mar 24 10:56:04 server1 postfix/qmgr[2370]: fatal:  mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table  lookup problem
```
Teamspeak:

```
2013-03-23 08:42:58.207043|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.208872|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.217165|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.218963|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.227284|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.229054|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.237407|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.239143|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.247526|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.249236|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.257648|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.259329|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.267758|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.269417|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.277837|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.279450|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.287893|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.289584|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.298383|DEBUG   |DatabaseQuery |   | waiting for connection available
2013-03-23 08:42:58.314858|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 1936261121
2013-03-23 08:42:58.314890|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4294967295
2013-03-23 08:42:58.314912|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4112
2013-03-23 08:42:58.314932|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 1953722220
2013-03-23 08:42:58.316199|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4294967295
2013-03-23 08:42:58.316248|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4112
2013-03-23 08:42:58.316279|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 1953722220
2013-03-23 08:42:58.316332|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4294967295
2013-03-23 08:42:58.316375|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 1936261121
2013-03-23 08:42:58.316396|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4294967295
2013-03-23 08:42:58.316414|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4112
2013-03-23 08:42:58.316430|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4294967295
2013-03-23 08:42:58.316448|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 1953722220
2013-03-23 08:42:58.316489|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4294967295
2013-03-23 08:42:58.316510|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4112
2013-03-23 08:42:58.329780|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4119
2013-03-23 08:42:58.336973|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 3829869
2013-03-23 08:42:58.337380|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4119
2013-03-23 08:42:58.337407|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 2416000712
2013-03-23 08:42:58.337508|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4119
2013-03-23 08:42:58.337534|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 2416000712
2013-03-23 08:42:58.337624|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4119
2013-03-23 08:42:58.337651|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 2416000712
2013-03-23 08:42:58.337767|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4119
2013-03-23 08:42:58.337794|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 2415925448
2013-03-23 08:42:58.337885|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4119
2013-03-23 08:42:58.337908|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 1382775372
2013-03-23 08:42:58.338071|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 4119
2013-03-23 08:42:58.338096|ERROR   |Query         |   | onRemoveConnection called with an invalid clientSocketID: 1382775372
2013-03-23 09:17:15.111778|WARNING |PktHandler    |   | detected incorrectly running system clock (>)
2013-03-23 09:18:34.318174|WARNING |PktHandler    |   | detected incorrectly running system clock (>)
2013-03-23 09:26:31.995603|WARNING |PktHandler    |   | detected incorrectly running system clock (>)
```
Habt ihr da eine Idee....?? Das Problem tritt interessanter weise immer nur morgens zwichen 9 und 11 Uhr auf...


----------



## Till (27. März 2013)

Irgendwelche Fehler in den mysql logs? Hast Du mal versucht max:connections und max_user_connections rauf zu setzen, z.B. beides auf 500?


----------



## Patric (27. März 2013)

Ne, auf 1000. Hilft nichts...


----------



## Patric (5. Apr. 2013)

Hallo, habe eben erneut Probleme gehabt, folgendes sagt die Log (Teamspeak): 
	
	



```
2013-04-05 02:51:59.531171|ERROR   |DatabaseQuery |   | db_open() select * from clients where not exists (select id1 from group_server_t error: Can't open file: './TEAMSPEAK/clients.frm' (errno: 24)
2013-04-05 02:52:27.342457|ERROR   |DatabaseQuery |   | db_exec() update clients set client_nickname='XXXX' where client_id=1 error: Out of resources when opening file './TEAMSPEAK/clients.MYD' (Errcode: 24)
2013-04-05 02:52:27.342495|CRITICAL|DatabaseQuery |   | Assertion "error == ERROR_ok" failed at server/serverlib/database/db_database.cpp:113;
```
Sieht für mich nach Problemen mit den Dateirechten aus, aber alle Daten unter /var/lib/mysql/ gehören mysql:mysql... Welche CHMOD Berechtigungen brauchen die Daten?
Noch irgend eine Idee?


----------



## Patric (5. Apr. 2013)

bzw. anders, ich habe jetzt mal alle Verbindungen von außen mittels 
	
	



```
iptables -A INPUT -p tcp --dport 3306 -j DROP
```
 geblockt. 
Nur scheinbar, nimmt der rescue das ernst... Wie prüft der Rescue ob der MySQL Server nicht verfügbar ist?


----------

