Hi @Sajith Gopalakrishnan Hema ,
For this error, as this post mentioned, you could try to follow these steps:
1.Go to Central Administration and see if you access.
2.Go to IIS Manager and check you application pools are all running. If not, start your application pools. To see if they are running click on Application Pool folder and you should see the list on the right-side under state should be "running" or "stopped".
3.Go to your site and see if its working now.
4.If not, go back to IIS and check to see what application pool is turned off again. Make sure SecurityTokenServiceApplicationPool is running. If not follow this:
SecurityTokenServiceApplicationPool Application Pool -> Advanced Settings.
5.Do an IIS Reset.
6.Go to the site and see if its working, these steps can be repeated for any app pool that keeps going off.
Reference:
500 Internal Server Error SharePoint
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
==========================
If there is an issue about SQL SERVER, I would suggest you post a new thread with only the SQL SERVER tag, then you will get professional advice from the SQL SERVER team. :)
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.