MySQL server has gone away
SELECT DISTINCT fmd_models.modelID, fmd_models.*, fmd_models_nationality.name AS nationality
FROM fmd_editorials_images_models
LEFT JOIN fmd_models ON fmd_models.modelid=fmd_editorials_images_models.modelID
LEFT JOIN fmd_models_nationality ON fmd_models.nationality_id=fmd_models_nationality.id
LEFT JOIN fmd_editorials_images ON fmd_editorials_images.id = fmd_editorials_images_models.editorialImageID
LEFT JOIN fmd_editorials ON fmd_editorials.id = fmd_editorials_images.editorialID
WHERE fmd_editorials_images.editorialID=27774;