DatabaseException

Out of memory (Needed 67108836 bytes) QUERY: (select count(distinct e.guid) as total from aty_event_profile ep LEFT JOIN elggentities e on e.guid = ep.elgg_guid LEFT JOIN aty_multiinput_field mf on e.guid = mf.elgg_guid LEFT JOIN elggmetadata m on e.guid = m.entity_guid LEFT JOIN elggmetastrings a1 on m.value_id=a1.id LEFT JOIN aty_event_profile aty on aty.elgg_guid =m.entity_guid where e.container_guid = 2146 and ((ep.start_date <= 1508630400) and ( ep.end_date <= 1508630400)) and( (e.access_id in (2) or (e.owner_guid = -1) or (e.access_id = 0 and e.owner_guid = -1)) and e.enabled='yes') and ( (m.access_id in (2) or (m.owner_guid = -1) or (m.access_id = 0 and m.owner_guid = -1)) and m.enabled='yes'))