This is the SELECT QUERY: MariaDB [(none)]> use tcm_offline Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [tcm_offline]> SELECT -> * -> FROM -> (SELECT -> site_index, -> turbine_id AS wt_id, -> turbine_serial AS wt_serial, -> turbine_name AS wt_turbine, -> display_name AS wt_name, -> (SELECT -> SUM(CASE -> WHEN -> (severity = 'fault' -> OR severity = 'emergency') -> AND acknowledged = 'no' -> AND syslog_events.state = 'active' -> THEN -> 1 -> ELSE 0 -> END) -> FROM -> syslog_events -> WHERE -> syslog_events.location_serial = turbine_serial) AS unack_syslogs, -> (SELECT -> SUM(CASE -> WHEN -> (severity = 'fault' -> OR severity = 'emergency') -> AND syslog_events.state = 'active' -> THEN -> 1 -> ELSE 0 -> END) -> FROM -> syslog_events -> WHERE -> syslog_events.location_serial = turbine_serial) AS syslogs, -> (SELECT -> GROUP_CONCAT(DISTINCT syslog_events.type_name) -> FROM -> syslog_events -> WHERE -> syslog_events.location_serial = turbine_serial -> AND state = 'Active' -> AND (severity = 'fault' -> OR severity = 'emergency')) AS types, -> (SELECT -> DATEDIFF(CURDATE(), MAX(after)) -> FROM -> rest_measurement_registry -> WHERE -> rest_measurement_registry.serial = turbine_serial) AS measurment_is_delayed -> FROM -> tcm_offline.site_configuration -> JOIN turbine_information ON site_index = mysqld_multi_index -> WHERE -> site_index = 2 AND site_index IN (1 , 2)) AS greens -> LEFT JOIN -> (SELECT -> SUBSTRING_INDEX(SUBSTRING_INDEX(MeasurementKey, '/', 2), '/', - 1) AS turbine, -> IFNULL(MAX(IF(AckStatus = 'UnAck', IF(ISNULL(ToTime), CASE -> WHEN -> AlarmType LIKE '%Red%' -> OR AlarmType LIKE 'Overrun' -> THEN -> 8 -> WHEN AlarmType LIKE '%Yellow%' THEN 7 -> WHEN AlarmType LIKE 'Blue%' THEN 6 -> ELSE 0 -> END, 2), IF(ISNULL(ToTime), CASE -> WHEN -> AlarmType LIKE '%Red%' -> OR AlarmType LIKE 'Overrun' -> THEN -> 5 -> WHEN AlarmType LIKE '%Yellow%' THEN 4 -> WHEN AlarmType LIKE 'Blue%' THEN 3 -> ELSE 0 -> END, 1))), - 1) AS severity -> FROM -> alarm_events -> WHERE -> site_index = 2 AND site_index IN (1 , 2) -> GROUP BY turbine) AS alarms ON greens.wt_turbine = alarms.turbine -> ORDER BY measurment_is_delayed DESC , severity DESC; ERROR 2013 (HY000): Lost connection to MySQL server during query MariaDB [tcm_offline]> This is from Mariadb.log [root@CMS-ENT-01 mariadb]# cat mariadb.log 180327 06:40:42 mysqld_safe Number of processes running now: 0 180327 06:40:42 mysqld_safe mysqld restarted 180327 6:40:42 [Note] /usr/libexec/mysqld (mysqld 5.5.56-MariaDB) starting as process 72645 ... 180327 6:40:42 InnoDB: The InnoDB memory heap is disabled 180327 6:40:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins 180327 6:40:42 InnoDB: Compressed tables use zlib 1.2.7 180327 6:40:42 InnoDB: Using Linux native AIO 180327 6:40:42 InnoDB: Initializing buffer pool, size = 128.0M 180327 6:40:42 InnoDB: Completed initialization of buffer pool 180327 6:40:42 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! InnoDB: Restoring possible half-written data pages from the doublewrite buffer... 180327 6:40:42 InnoDB: Waiting for the background threads to start 180327 6:40:43 Percona XtraDB (http://www.percona.com) 5.5.52-MariaDB-38.3 started; log sequence number 33146966 180327 6:40:43 [Note] Plugin 'FEEDBACK' is disabled. 180327 6:40:43 [Note] Server socket created on IP: '0.0.0.0'. 180327 6:40:43 [Note] Event Scheduler: Loaded 0 events 180327 6:40:43 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.5.56-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server 180327 6:42:02 [ERROR] mysqld got signal 11 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. To report this bug, see http://kb.askmonty.org/en/reporting-bugs We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. Server version: 5.5.56-MariaDB key_buffer_size=1073741824 read_buffer_size=131072 max_used_connections=2 max_threads=202 thread_count=2 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1491713 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x7f9193266df0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 0x7f918825bdc0 thread_stack 0x48000 /usr/libexec/mysqld(my_print_stacktrace+0x3d)[0x7f918fe5996d] /usr/libexec/mysqld(handle_fatal_signal+0x515)[0x7f918fa6f285] /lib64/libpthread.so.0(+0xf5e0)[0x7f918f19c5e0] /usr/libexec/mysqld(_ZN10Item_fieldC1EP5Field+0xc)[0x7f918fa8625c] /usr/libexec/mysqld(_ZN14Item_subselect18get_tmp_table_itemEP3THD+0x66)[0x7f918faf21d6] /usr/libexec/mysqld(_ZN20Item_direct_view_ref18get_tmp_table_itemEP3THD+0x11)[0x7f918fa93f91] /usr/libexec/mysqld(_ZN4JOIN4execEv+0x184c)[0x7f918f98f81c] /usr/libexec/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x119)[0x7f918f989b39] /usr/libexec/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x2db)[0x7f918f98a5fb] /usr/libexec/mysqld(+0x36b9d9)[0x7f918f9389d9] /usr/libexec/mysqld(_Z21mysql_execute_commandP3THD+0x45d1)[0x7f918f943001] /usr/libexec/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x125)[0x7f918f9458c5] /usr/libexec/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1753)[0x7f918f947923] /usr/libexec/mysqld(_Z24do_handle_one_connectionP3THD+0x1c2)[0x7f918f9f9632] /usr/libexec/mysqld(handle_one_connection+0x4a)[0x7f918f9f96da] /lib64/libpthread.so.0(+0x7e25)[0x7f918f194e25] /lib64/libc.so.6(clone+0x6d)[0x7f918d99234d] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (0x7f9124004be8): SELECT * FROM (SELECT site_index, turbine_id AS wt_id, turbine_serial AS wt_serial, turbine_name AS wt_turbine, display_name AS wt_name, (SELECT SUM(CASE WHEN (severity = 'fault' OR severity = 'emergency') AND acknowledged = 'no' AND syslog_events.state = 'active' THEN 1 ELSE 0 END) FROM syslog_events WHERE syslog_events.location_serial = turbine_serial) AS unack_syslogs, (SELECT SUM(CASE WHEN (severity = 'fault' OR severity = 'emergency') AND syslog_events.state = 'active' THEN 1 ELSE 0 END) FROM syslog_events WHERE syslog_events.location_serial = turbine_serial ) AS syslogs, (SELECT GROUP_CONCAT(DISTINCT syslog_events.type_name) FROM syslog_events WHERE syslog_events.location_serial = turbine_serial AND state = 'Active' AND (severity = 'fault' OR severity = 'emergency')) AS types, (SELECT DATEDIFF(CURDATE(), MAX(after)) FROM rest_measurement_registry WHERE rest_measurement_registry.serial = turbine_serial) AS measurment_is_delayed FROM tcm_offline.site_configuration JOIN turbine_information ON site_index = mysqld_multi_index WHERE site_index = 2 and site_index IN (1,2) ) AS greens LEFT JOIN (SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(MeasurementKey, '/', 2), '/', - 1) AS turbine, IFNULL(MAX(IF(AckStatus = 'UnAck', IF(ISNULL(ToTime), CASE WHEN AlarmType LIKE '%Red%' OR AlarmType LIKE 'Overrun' THEN 8 WHEN AlarmType LIKE '%Yellow%' THEN 7 WHEN AlarmType LIKE 'Blue%' THEN 6 ELSE 0 END, 2), IF(ISNULL(ToTime), CASE WHEN AlarmType LIKE '%Red%' OR AlarmType LIKE 'Overrun' THEN 5 WHEN AlarmType LIKE '%Yellow%' THEN 4 WHEN AlarmType LIKE 'Blue%' THEN 3 ELSE 0 END, 1))), - 1) AS severity FROM alarm_events WHERE site_index = 2 and site_index IN (1,2) GROUP BY turbine) AS alarms ON greens.wt_turbine = alarms.turbine ORDER BY turbine, measurment_is_delayed desc,severity desc Connection ID (thread ID): 8 Status: NOT_KILLED Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash. 180327 06:42:02 mysqld_safe Number of processes running now: 0 180327 06:42:02 mysqld_safe mysqld restarted 180327 6:42:02 [Note] /usr/libexec/mysqld (mysqld 5.5.56-MariaDB) starting as process 72817 ... 180327 6:42:02 InnoDB: The InnoDB memory heap is disabled 180327 6:42:02 InnoDB: Mutexes and rw_locks use GCC atomic builtins 180327 6:42:02 InnoDB: Compressed tables use zlib 1.2.7 180327 6:42:02 InnoDB: Using Linux native AIO 180327 6:42:02 InnoDB: Initializing buffer pool, size = 128.0M 180327 6:42:02 InnoDB: Completed initialization of buffer pool 180327 6:42:02 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! InnoDB: Restoring possible half-written data pages from the doublewrite buffer... 180327 6:42:03 InnoDB: Waiting for the background threads to start 180327 6:42:04 Percona XtraDB (http://www.percona.com) 5.5.52-MariaDB-38.3 started; log sequence number 33146976 180327 6:42:04 [Note] Plugin 'FEEDBACK' is disabled. 180327 6:42:04 [Note] Server socket created on IP: '0.0.0.0'. 180327 6:42:04 [Note] Event Scheduler: Loaded 0 events 180327 6:42:04 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.5.56-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server