SQL Server 2012 Crashes and service doesn't restart We've been having an issue with our SQL server lately. It seems that the server will run out of memory and then crash. For some reason, the sql service wouldn't restart. I would have to go and manually restart it and then it's fine.

I am still trying to figure out the memory issue. We are using SQL Server 2012 SP1 Enterprise Edition. This is on a Windows 2012 Server. I saw alot of 701 out of memory error on the server right before it crashed and I'm still trying to figure out what is causing the memory error.

Why wouldn't the SQL Service be restarted automatically? Is it because of the memory issue?

Also, server has 20gb of memory and the max server memory is set to 16.5gb. I have noticed that the MEMORYCLERK_SQLOPTIMIZER is really high, around 11.5 gb right before the server crashes.

Anyone know why that would be so high? Is that what's causing the memory errors?

Any help will be appreciated.
Thanks.
You are running into a known bug - There is a fix for it but update to SP2 rather than installing the hotfix.

The errorlog contains SQL Server is terminating a system or background task HADR Task due to errors in starting up the task (setup state 1). and you are using availability groups. The memory leak  is in the MEMORYCLERK_SQLLOGPOOL which is used for transaction log activity.