Executing the following statement:
select format(3.145,'#.00 kr','no')
Causing the following error to be logged:
Msg 6517, Level 16, State 1, Line 1
Failed to create AppDomain "master.sys[runtime].X".
Exception has been thrown by the target of invocation.
X is a number, starting with 1 and increasing with 1 for every execution of the code above.
There is a lot of free memory on the server. This message is also logged in the SQL Server Error Log and in the event log, but there are no additional information there. The server had been in standby for some days prior to this error message.