Interesting thread, and I have ended up here via various articles because I am seeing alot of the following messages 2-3 times a minute in the logs for a number of databases...,
AppDomain 161 (DatabaseName.dbo[runtime].174) is marked for unload due to memory pressure.
...sometimes it will be just one database several times in one minute, then other times all three will appear. There are more than 3 DB's on the server (11 user DBs in total), but these ones are the only ones to appear with the error. The entire screen can be full of nothing but these errors.
I thought I found my answer here, but it raises more questions. Higher up in the thread I read that if I am on 64bit it's not relevant, we are running Windows 2012 and SQL Server 2012 SP1 build 11.0.3000.0, so perhaps none of this really relates.
As for the physical memory, which reading earlier also does not seem relevant (but I'll include it here anyway), is set at
MAX The default of 2147483647
...not set by me, when I am in charge I set max appropriately.
I ran the VAS query and got the following results...
Total Available Mem: 137145368572
Max Free Size : 137109232840
...here I am just totally confused. This is in the TBs. The box is physical, not virtual.
I'd love a bit of guidence in getting this cleared up. I'm not sure what way to turn as this point, and the box is critical. Obviously I am more than happy to provide more information.
Thank you for reading, and your time.
PS: As an aside, I just ran the following query in case it revealed anything extra, from the bottom line onwards it was the same...
SELECT type, virtual_memory_committed_kb, pages_kb
WHERE virtual_memory_committed_kb > 0 OR pages_kb > 0
order by virtual_memory_committed_kb desc;
MEMORYCLERK_SQLCLR 123612 24712
MEMORYCLERK_XE_BUFFER 4608 0
USERSTORE_TOKENPERM 0 8