You are allowed stay in Sri Lanka on a tourist visa for a maximum of 30 days. However, it is possible to leave the country and re-enter for another 30 days within the 90 day visa time period.