fixed crashing on sending very big array from service and fixed sql query that befor select all data from db but not a time ranged