• Physical - Not VM

    Model : ProLiant DL580 G7

    CPU : 4x10

    Memory : 512 GB

    OS : Windows 2008R2 ENT

    Max Server Memory = 20 GB

    Since posting on this site, I increased the memory allocation for this SQL instance to 40 GB. This eliminated the FAIL ALLOCATION event, and prevented SQL from hanging. Tracing the CACHESTORE_PHDR clerk yielded something interesting. It briefly grows from 38 MB to 17GB and then shrinks to less than 1 MB.

    Timestamp size_kb

    ================ =======

    2015-08-31 02:20:45.651 328

    2015-08-31 02:20:30.649 17075664

    2015-08-31 02:20:15.648 12631408

    2015-08-31 02:20:00.642 38472

    PHDR grows likes this 4-times per day at the same times each day. The following message appears in the SQL log each time PHDR grows large:

    "The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions..."

    Questions:

    How may I identify the offending query?

    Is this expected SQL behavior?