I have an instance of SQL Express 2008 running as the backend for a small webapp on a server.

The server specs: Windows 2003, 64bit quadcore, 4gb ram

The SQL database is only 50mb on disk and I have never seen the SQL process use more than 200mb of ram in the task manager but I am noticing these messages related to memory issues in the SQL Logs.

AppDomain 2 (mssqlsystemresource.sys[runtime].1) is marked for unload due to memory pressure.

Any idea what could cause this ?


Express edition uses an artificially imposed self restriction on memory and CPU. It will not expand it's buffer pool over 1GB and will not create more than one scheduler (ie. will only use one core). As a result, no matter how much physical RAM you have, your system can experience memory pressure. Since some SQL data types are implemented in CLR (like geography and geometry) this memory pressure can evict the appdomains that host these system types (hence the appdomains being in mssqlsystemresource).

  • That's a good point about the 1GB limit, I didn't even see the word "Express" because it came before the version/year. :-\ – Aaron Bertrand Oct 23 '09 at 15:38

Don't trust Task Manager! Look at perfmon counters to see how much memory SQL Server is really using.

Are you using linked servers? Take a look at these threads / articles:

MSDN Forum:AppDomain marked for unload due to memory pressure

SQL Monster: AppDomain is marked for unload due to memory pressure

PSS SQL Blog: If you use linked server queries, you need to read this

Also these KB articles:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.