The age limit and number of attempts permitted to write the UPSC Civil Services Exam vary depending on the candidate's category. For details, please refer to the eligibility criteria for the IAS exam.