locked
Unaccounted memory and System.outofMemoryException issue RRS feed

  • Question

  • I am facing an memory issue as pointed out by application person as they get below error on their application interface, this erorr appears when reports are being run and system is starved our of memory so the reports crash is what is putforward

    -------------------

    Error -Exception of type 'System.outofMemoryException' was thrown
    at String.CtorCharCount
    Last DataFactory error : 
    Stack Trace :
    At System.String.CtorCharCount(Char c,Int32 count)
    at Microsoft.VisualBasic.compilerservices likeoperator matchrange(string source,Int32)

    ---------------

    On the SQL server below can be observed on querying dm_os_process_memory, the max server memory on this SQL2014 ENT core editon (4 cores) is set to 90GB and we have total OS server memory as 100GB.

    Memory_usedby_Sqlserver_MB Locked_pages_used_Sqlserver_MB Total_VAS_in_MB process_physical_memory_low process_virtual_memory_low
    91018 90258 134217727 0 0

    When i query buffer descriptors i can see below utilisation that comes close to 73 G B , on task manager i can see SQL server.exe using 726,728K .

    What confuses is where is the remaining memory between 73 GB to 90GB getting into as i cant see if SQL uses that much internally. 

    db_name db_buffer_pages db_buffer_MB db_buffer_percent
    X 7299774 57029 NULL
    Y 163245 1275 NULL
    Z 135231 1056 NULL
    tempdb 26670 208 NULL
    msdb 2986 23 NULL
    A 1842 14 NULL
    B 591 4 NULL
    master 202 1 NULL
    C 19 0 NULL
    model 13 0 NULL


    Friday, September 15, 2017 1:25 PM

Answers

  • Then the best option is to contact the support of the software vendor, they can analyze the issue and debug the software.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Friday, September 15, 2017 4:02 PM

All replies

  • What happens if you run the same query / SP in SSMS on the server? If it executes without any issue, then I think it is front-end issue.

    Please visit my Blog for some easy and often used t-sql scripts
    My BizCard

    Friday, September 15, 2017 1:32 PM
  • Error -Exception of type 'System.outofMemoryException' was thrown
    at String.CtorCharCount
    Last DataFactory error : 
    Stack Trace :
    At System.String.CtorCharCount(Char c,Int32 count)
    at Microsoft.VisualBasic.compilerservices likeoperator matchrange(string source,Int32)

    That's not an error message raised by SQL Server; that error occurs on client side in the application.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Friday, September 15, 2017 1:38 PM
  • Cheers Olaf, can you help me how to put that forward to make them understand if its something on their local workstation. Can you assist to know if my SQL memory utilization appears stable further to below screen taken on my DB machine and the provided output in my post.

    Friday, September 15, 2017 1:42 PM
  • Its an vendor managed application and all information available to me is users are running multiple reports and processes that often crash or shut down and they point to insufficient memory on the server level.
    Friday, September 15, 2017 1:49 PM
  • It is the client that runs out of memory and that is where you need to look for the source of the problem. If the vendor points to SQL Server because of this problem, they are making fools of themselves.

    A user can run out of memory on SQL Server level if there are resource pools configured etc, but that error message looks entirely different.

    Friday, September 15, 2017 2:54 PM
  • Then the best option is to contact the support of the software vendor, they can analyze the issue and debug the software.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Friday, September 15, 2017 4:02 PM
  • I am facing an memory issue as pointed out by application person as they get below error on their application interface, this erorr appears when reports are being run and system is starved our of memory so the reports crash is what is putforward

    -------------------

    Error -Exception of type 'System.outofMemoryException' was thrown
    at String.CtorCharCount
    Last DataFactory error : 
    Stack Trace :
    At System.String.CtorCharCount(Char c,Int32 count)
    at Microsoft.VisualBasic.compilerservices likeoperator matchrange(string source,Int32)

    >>>Almost you have answered ,ask them to run report interms of lower chunk instead calling huge data(if they are trying to do).

    Memory is using as you set could see from your dmv output but you can also check in the counters too.


    Regards, S_NO "_"


    • Edited by S_NO Friday, September 15, 2017 4:44 PM +
    Friday, September 15, 2017 4:43 PM
  • Thanks for this information..Let me put forth.
    Friday, September 15, 2017 5:15 PM
  • Thank you so much.
    Friday, September 15, 2017 5:30 PM
  • Hi Eben,

    Have you checked it on the client side? Could you please tell us if you have solved this problem? If it is, could you please mark these replies which are helpful to you as Answered?

    Best Regards,

    Teige


    MSDN Community Support<br/> Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact <a href="mailto:MSDNFSF@microsoft.com">MSDNFSF@microsoft.com</a>.

    • Proposed as answer by Teige Gao Tuesday, October 10, 2017 12:31 AM
    Thursday, September 21, 2017 8:17 AM
  • Hi Teige, 

    We have this issue still persisting or say recurring close to an year again, we have raised an case with vendor but still vendor has laid the cause of error on server and database. I am persuading again and will surely mark the answer as soon as I hear from vendor. 

    Tuesday, December 11, 2018 8:20 PM