צרות עם MYSQL - 2 שאלות
רקע - יש לי מכונה וירטואלית עם UBUNTU 12.04.
הכל עבד סבבה עד שאחד האתרים המאוחסנים דפק בצורה כזאת נוראית את הדטבייס, עד כדי כך שהיינו חייבים לבנות מחדש את השרת(!)
ניסינו לתקן טבלאות עם MYISAMCHK וכיו"ב, ניסינו לשחזר גיבויים.
במצב הנוכחי יש לנו מכונה חדשה אבל דטבייס במצב לא תקין או לא קונסיסטנטי! (של אחד האתרים)
1) שאלה אחת לא לגמרי קשורה ל-MYSQL -
ה-SERVICE של MYSQL עוצר לפעמים. אני רוצה (בינתיים, עד שהבעיה תתוקן) שהוא יופעל מחדש.
קראתי על RESPAWN, אבל לא הבנתי איך אפשר לקבוע UNLIMITED - כלומר שיעשה כל הזמן RESTART במקרה שהוא נתקע.
קבעתי RESPAWN LIMIT 2000 אבל עדיין אני מגיע למחרת ורואה שהMYSQL בסטטוס STOP.
אז האם יש דרך ואיך לעשות RESTART כל פעם שה-MYSQL מת ?
2) שאלה שנייה:
האם אתם רואים משהו חריג
(חוץ מ-כמובן- השורות שאומרות שיש טבלאות שבורות)
130503 7:57:09 [Note] Plugin 'FEDERATED' is disabled.
130503 7:57:09 InnoDB: The InnoDB memory heap is disabled
130503 7:57:09 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130503 7:57:09 InnoDB: Compressed tables use zlib 1.2.3.4
130503 7:57:09 InnoDB: Initializing buffer pool, size = 128.0M
130503 7:57:09 InnoDB: Completed initialization of buffer pool
130503 7:57:09 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130503 7:57:09 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
130503 7:57:10 InnoDB: Waiting for the background threads to start
130503 7:57:11 InnoDB: 1.1.8 started; log sequence number 10007706
130503 7:57:11 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
130503 7:57:11 [Note] - '127.0.0.1' resolves to '127.0.0.1';
130503 7:57:11 [Note] Server socket created on IP: '127.0.0.1'.
130503 7:57:11 [Note] Event Scheduler: Loaded 0 events
130503 7:57:11 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.29-0ubuntu0.12.04.2' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
130503 7:57:12 [ERROR] /usr/sbin/mysqld: Table './my_faulty_db/cache' is marked as crashed and should be repaired
130503 7:57:12 [Warning] Checking table: './my_faulty_db/cache'
130503 7:57:12 [ERROR] /usr/sbin/mysqld: Table './my_faulty_db/cache_menu' is marked as crashed and last (automatic?) repair failed
130503 7:57:12 [ERROR] /usr/sbin/mysqld: Table './my_faulty_db/cache_page' is marked as crashed and should be repaired
130503 7:57:12 [Warning] Checking table: './my_faulty_db/cache_page'
130503 7:57:13 [ERROR] /usr/sbin/mysqld: Table './my_faulty_db/counter' is marked as crashed and last (automatic?) repair failed
130503 7:57:13 [ERROR] /usr/sbin/mysqld: Table './my_faulty_db/counter_data' is marked as crashed and should be repaired
130503 7:57:13 [Warning] Checking table: './my_faulty_db/counter_data'
130503 7:57:14 [ERROR] /usr/sbin/mysqld: Table './my_faulty_db/sessions' is marked as crashed and last (automatic?) repair failed
יותר מאוחר אצרף לוג קצת יותר מעניין.
רקע - יש לי מכונה וירטואלית עם UBUNTU 12.04.
הכל עבד סבבה עד שאחד האתרים המאוחסנים דפק בצורה כזאת נוראית את הדטבייס, עד כדי כך שהיינו חייבים לבנות מחדש את השרת(!)
ניסינו לתקן טבלאות עם MYISAMCHK וכיו"ב, ניסינו לשחזר גיבויים.
במצב הנוכחי יש לנו מכונה חדשה אבל דטבייס במצב לא תקין או לא קונסיסטנטי! (של אחד האתרים)
1) שאלה אחת לא לגמרי קשורה ל-MYSQL -
ה-SERVICE של MYSQL עוצר לפעמים. אני רוצה (בינתיים, עד שהבעיה תתוקן) שהוא יופעל מחדש.
קראתי על RESPAWN, אבל לא הבנתי איך אפשר לקבוע UNLIMITED - כלומר שיעשה כל הזמן RESTART במקרה שהוא נתקע.
קבעתי RESPAWN LIMIT 2000 אבל עדיין אני מגיע למחרת ורואה שהMYSQL בסטטוס STOP.
אז האם יש דרך ואיך לעשות RESTART כל פעם שה-MYSQL מת ?
2) שאלה שנייה:
האם אתם רואים משהו חריג
(חוץ מ-כמובן- השורות שאומרות שיש טבלאות שבורות)
130503 7:57:09 [Note] Plugin 'FEDERATED' is disabled.
130503 7:57:09 InnoDB: The InnoDB memory heap is disabled
130503 7:57:09 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130503 7:57:09 InnoDB: Compressed tables use zlib 1.2.3.4
130503 7:57:09 InnoDB: Initializing buffer pool, size = 128.0M
130503 7:57:09 InnoDB: Completed initialization of buffer pool
130503 7:57:09 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130503 7:57:09 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
130503 7:57:10 InnoDB: Waiting for the background threads to start
130503 7:57:11 InnoDB: 1.1.8 started; log sequence number 10007706
130503 7:57:11 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
130503 7:57:11 [Note] - '127.0.0.1' resolves to '127.0.0.1';
130503 7:57:11 [Note] Server socket created on IP: '127.0.0.1'.
130503 7:57:11 [Note] Event Scheduler: Loaded 0 events
130503 7:57:11 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.29-0ubuntu0.12.04.2' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
130503 7:57:12 [ERROR] /usr/sbin/mysqld: Table './my_faulty_db/cache' is marked as crashed and should be repaired
130503 7:57:12 [Warning] Checking table: './my_faulty_db/cache'
130503 7:57:12 [ERROR] /usr/sbin/mysqld: Table './my_faulty_db/cache_menu' is marked as crashed and last (automatic?) repair failed
130503 7:57:12 [ERROR] /usr/sbin/mysqld: Table './my_faulty_db/cache_page' is marked as crashed and should be repaired
130503 7:57:12 [Warning] Checking table: './my_faulty_db/cache_page'
130503 7:57:13 [ERROR] /usr/sbin/mysqld: Table './my_faulty_db/counter' is marked as crashed and last (automatic?) repair failed
130503 7:57:13 [ERROR] /usr/sbin/mysqld: Table './my_faulty_db/counter_data' is marked as crashed and should be repaired
130503 7:57:13 [Warning] Checking table: './my_faulty_db/counter_data'
130503 7:57:14 [ERROR] /usr/sbin/mysqld: Table './my_faulty_db/sessions' is marked as crashed and last (automatic?) repair failed
יותר מאוחר אצרף לוג קצת יותר מעניין.