web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM API hanging server

(0) ShareShare
ReportReport
Posted on by

We have developed an API which connects to our Dynamics 365 instance and retrieves data, allows us to manipulate it and repost it to CRM. 

This works fine but every few days, it maxes the server out at 99%, meaning we need to restart the server as it becomes unresponsive. We have other web services connecting to CRM which do not display the same symptoms. 

We are using the following CRM libraries in our solution :-

Microsoft.Xrm.Sdk;
Microsoft.Xrm.Sdk.Client;
Microsoft.Xrm.Sdk.Query;

Any help is gratefully received. 

Thanks

Craig

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: CRM API hanging server

    Forgot to say, this happens in IIS on both Server 2008 R2 and also Server 2016

  • CU05111119-0 Profile Picture
    4,697 on at
    RE: CRM API hanging server

    Hello Craig,

    Would you be able to share the code with us of what you are going with the SDK?

    Also, can you check you have the latest version: 9.0.0.7? Which can be easily obtained via NuGet www.nuget.org/.../Microsoft.CrmSdk.CoreAssemblies

  • Community Member Profile Picture
    on at
    RE: CRM API hanging server

    Hi Michel

    Thanks for the reply. I've enclosed a snippet of the code below. If you need more, let me know. I'll check the version of the SDK also

    [HttpGet]

           [Route("Interview/getInterviews")]

           public List<Interviews> getInterviews()

           {

               var interviews = new List<Interviews>();

               try

               {

                   OrganizationServiceProxy serviceProxy;

                   ClientCredentials clientCreds = new ClientCredentials();

                   clientCreds.UserName.UserName = Properties.Settings.Default.crmUsername;

                   clientCreds.UserName.Password = Properties.Settings.Default.crmPassword;

                   using (serviceProxy = new OrganizationServiceProxy(new Uri("ourorg/.../Organization.svc&quot;), null, clientCreds, null))

                   {

                       serviceProxy.Timeout = new TimeSpan(0, 0, 1, 0);

                       serviceProxy.EnableProxyTypes();

                       IOrganizationService _service = (IOrganizationService)serviceProxy;

                       var qewark_interview = new QueryExpression(wark_interview.EntityLogicalName);

                       qewark_interview.ColumnSet = new ColumnSet(true);

                       qewark_interview.AddOrder("wark_specifiedtime", OrderType.Ascending);

                       // Define filter QEwark_interview.Criteria

                       qewark_interview.Criteria.AddCondition("statuscode", ConditionOperator.In, 283200001, 1, 283200000);

                       var retrievedInterviews = _service.RetrieveMultiple(qewark_interview);

                       foreach (wark_interview inter in retrievedInterviews.Entities)

                       {

                           var newInter = new Interviews();

                           if (inter.wark_Course != null) newInter.courseName = inter.wark_Course.Name;

                           newInter.Id = inter.Id;

                           if (inter.wark_SpecifiedTime.HasValue) newInter.interviewDate = inter.wark_SpecifiedTime.Value;

                           if (inter.wark_Student != null) newInter.studentName = inter.wark_Student.Name;

                           if (inter.wark_HostCollege != null) newInter.collegeName = inter.wark_HostCollege.Name;

                           interviews.Add(newInter);

                       }

                   }

               }

               catch (Exception)

               {

                   throw;

               }

               return interviews;

           }

  • Community Member Profile Picture
    on at
    RE: CRM API hanging server

    Any suggestions as to what the problem may be?

    Thanks

    Craig

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
UllrSki Profile Picture

UllrSki 2

#1
Community Member Profile Picture

Community Member 2

#3
SC-08081331-0 Profile Picture

SC-08081331-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans