MySQL server has gone away
SELECT d.*,, dt.friendly_url, as area, DATE_FORMAT(d.start_date,'%d.%m.%Y') as start_date_str, UNIX_TIMESTAMP(d.start_date) as start_date_stamp, DATE_FORMAT(d.end_date,'%d.%m.%Y') as end_date_str, UNIX_TIMESTAMP(d.end_date) as end_date_stamp, as state, as size, as organizer, as protocols_state, as country, as competition_group, as type, as global_competition, CONCAT(iu.first_name,' ',iu.last_name) as insert_user FROM spo_sp_competition d LEFT JOIN spo_sp_competition_text dt ON d.competition_id = dt.competition_id AND dt.lang_id=1 LEFT JOIN spo_sp_area_text at ON d.area_id = at.area_id AND at.lang_id=1 LEFT JOIN spo_sp_competition_state_text sta ON d.state_id = sta.state_id AND sta.lang_id=1 LEFT JOIN spo_sp_competition_size_text st ON d.size_id = st.size_id AND st.lang_id=1 LEFT JOIN spo_sp_organizer o ON d.organizer_id = o.organizer_id LEFT JOIN spo_sp_competition_protocols_state_text pst ON d.protocols_state_id = pst.protocols_state_id AND pst.lang_id=1 LEFT JOIN spo_country_text cot ON d.country_id = cot.country_id AND cot.lang_id=1 LEFT JOIN spo_sp_competition_group_text cgt ON d.competition_group_id = cgt.competition_group_id AND cgt.lang_id=1 LEFT JOIN spo_sp_competition_type_text tt ON d.type_id = tt.type_id AND tt.lang_id=1 LEFT JOIN spo_sp_competition_text dgt ON d.global_competition_id = dgt.competition_id AND dgt.lang_id=1 LEFT JOIN spo_user iu ON d.insert_user_id = iu.user_id WHERE d.competition_id=2004

filelineclass + method