Why aren't service application pools recycled on solution retract/update?

When you update or retract a SharePoint solution, it's supposed to automatically restart or recycle any affected application pools on all servers on the farm. For web application pools, this appears to be largely true (though I've seen exceptions). However
for service application pools, it's definitely not, and this essentially means that after updating a SharePoint solution, you must manually recycle/restart
the service application pools, or you get all sorts of potentially weird behaviour because code running under the service application pool is still using old versions of your assemblies (one obvious error that happens frequently for us is "The located
assembly's manifest definition does not match the assembly reference", but there are far more subtle possible errors). My question is - why would this be true, and is there a good way around it? Even if it's just to accept that customers must use our
provided install tool to upgrade and the install tool does the correct thing, it would seem quite a significant amount of code is required to search all servers in the farm and request them to restart their application pools (I do have some code, but haven't
tested it yet).
Anyone else experienced this?
Dylan

http://social.technet.microsoft.com/Forums/sharepoint/en-US/2cd41773-d77b-463a-a078-821b5dae86e8/updatespsolution-recycling-applciation-pools-of-all-webapplication-in-the-farm?forum=sharepointadminprevious
The application pool recyle on update-SPSolution depends on how the solution manifest file if created. In the manifest file, if the solution node has attribute ResetWebServerModeOnUpgrade set to Recycle, the the upgrade process recycles the application pool.
Please check the below link on the solution manifest schema
http://msdn.microsoft.com/en-us/library/ms412929.aspx
http://msdn.microsoft.com/en-us/library/ee231559.aspx
http://sharepoint.stackexchange.com/questions/83049/when-do-we-need-an-iisreset-after-deployment
http://blog.ithinksharepoint.com/2012/07/16/deploying-sharepoint-wsp-solutions-without-downtime/

Similar Messages

  • Service application pool recycling in SharePoint 2013

    When to recycle service application pool in SharePoint 2013? is it necessary to do so?.
    When I look at worker process section in inetmanager i see 25 GB is for reporting service application pool as used memory and for excel services application pool it is 11 GB
    what does it mean? it is consuming this much amount of RAM? if so how we need to plan...do i need to recycle once in day? currently we are seeing slow performance. is it because of this? Please help.
    Thanks, Ram Ch

    Thanks for the response to both of you.
    Trevor, I did all that you specified, result of that is the following forum questions raised by me.(it is same issue performance).
    Private memory is used memory right? I am confused with unused memory you mentioned, can you please clarify.
    and also please go through below questions raised by me for the same issue. Kindly help.
    https://social.technet.microsoft.com/Forums/office/en-US/7de40349-4a31-4d7a-aced-0b80cc69c5b4/powerpivot-reports-are-getting-loaded-very-slow-very-often-in-sharepoint-2013?forum=sharepointadmin
    https://social.technet.microsoft.com/Forums/office/en-US/68636329-4f48-4458-8645-31acca7f6d1c/sql-services-2012-reporting-services-performance-issue-powerview?forum=sqlreportingservices
    https://social.technet.microsoft.com/Forums/office/en-US/9e558c89-0311-42c1-95dd-540f70914e00/powerpivot-reports-are-getting-loaded-very-slow-very-often-in-sharepoint-2013-sql-server-2012?forum=sqlkjpowerpivotforexcel
    Thanks, Ram Ch

  • Security Token Service Application Pool high CPU

    The SecurityTokenServiceApplicationPool seems to be using really high CPU at times and it seems to slow down the servercausing spike to almost 100% CPU, recycling takes care of it temporarily, it will also go down on its own but to a lesser extent.
    I cant seem to see any cause of this in the logs.
    The Security Token Service Application Pool isnt on a recycle schedule by default.
    Does anyone recommend putting it on a recycle schedule?
    What are some common causes of it
    thanks
    themush

    Hi,
    As I understand, the SecurityTokenServiceApplicationPool caused high CPU usage in your envrionment.
    Would recycling the application pool be help?
    To check if there is performance issue, please provide more information about your application server which host this service application.
    http://technet.microsoft.com/en-us/library/cc262485(v=office.15).aspx#hwforwebserver
    Here are some references for application pool high usage in SharePoint:
    http://weblogs.asp.net/erobillard/thoughts-on-sharepoint-application-pools-recycling-and-quot-jit-lag-quot
    http://blogs.technet.com/b/stefan_gossner/archive/2007/11/26/dealing-with-memory-pressure-problems-in-moss-wss.aspx
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Unexpected Application Pool recycle

    Hi all,
    in a new SharePoint 2013 environment with single server we are facing issues caused by an unexpected application pool recycle.
    Environment:
    Sharepoint 2013 15.0.4569.1000
    SQL Server 2012 SP1 11.0.34.12.0
    Both are installed on one server with OS Windows Server 2012
    At the time, the application pool recycles unexpected, we get the following error in the event logs:
    WebHost failed to process a request.
    Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/14128997
    Exception: System.ServiceModel.ServiceActivationException: Request to the service at '~/_vti_bin/client.svc' cannot be dispatched because the virtual application at '/' is shutting down. ---> System.InvalidOperationException: Request to the service at '~/_vti_bin/client.svc' cannot be dispatched because the virtual application at '/' is shutting down.
    --- End of inner exception stack trace ---
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.FailActivationIfRecyling(String normalizedVirtualPath)
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
    at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath, EventTraceActivity eventTraceActivity)
    Process Name: w3wp
    Process ID: 10272
    In ULS logs, the following is logged:
    11/13/2014 15:25:25.78 w3wp.exe (0x2960) 0x3E00 SharePoint Foundation General avey High The application domain /LM/W3SVC/117770872/ROOT-1-130603160450118907 is unloading and going to be recycled.
    Where the application domain contains the ID of the affected SharePoint IIS site.
    I have removed all runtime recycling events and only set up a scheduled recycling at 2am. Furthermore according to compilation-Element article, the parameter numRecompilesBeforeAppRestart was set to "2000" in web.config without any success.
    At the SharePoint environment, some custom solutions are installed, but the vendor assured, the application does not call any recycle event.
    Do you have any idea how to find the source of the recycle events or how to fix this?
    Any idea would be much appreciated.
    Thank in advance!

    Are there any sort of automated web configs for any applications that exist within that App Pool? App Pool timeouts (20 minutes idle) are not the same thing as recycles :)
    Are there any failures in the System Event Log when you see these messages? What do the WAS events in the System Event Log show?
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • MBAM 2.5 Web Applications installation - "Web service application pool account is not valid"

    Hi,
    I've created a Server 2012R2 installation to install MBAM 2.5. When installing the Web Applications I keep getting "The web service application pool account is not valid". 
    The account I am using is a standard domain account with admin rights on the Server and I've also set the SPN (both netbios and FQDN) and Delegation.
    This account is also a member of the group that is defined as RW of the SQL databases (which were setup without any problem and are on a separate  Server 2008R2, SQL 2008R2 installation.
    I am also getting an error with the SSRS URL , stating "SQL Server Reporting Services URL that points to the MBAM reports is not valid", despite being able to browse to the http://[FQDN]/ReportServer_MBAM location.
    Thanks.

    I got this kind of error when I revert back my virtual machine a lot to my previous checkpoints. I hope this can't be an issue for you.
    Make sure the application pool account must have the following login roles on the SQL server and have following rights on the reporting instance:-
    Required SQL Server permissions
    The user responsible for installing MBAM database and reporting feature must have the local administrator privileges and the following log in permission:-
    SQL Server instance login server roles:
    dbcreator
    processadmin
    SQL Server Reporting Services instance rights:
    Create Folder
    Publish Reports
    SQL Server Database Engine Services: SQL Server Database Engine Services must be installed and running during MBAM Server installation.
    SQL Server Reporting Services (SSRS): SSRS must be installed and running during the MBAM Server installation. Configure SSRS in "native" mode and not in "SharePoint" mode.
    Gaurav Ranjan

  • Does Mount-SPContentDatabase Require IISReset or Application Pool Recycling

    We need to attach a very large number of Content Databases to production farm. We are in dilemma about whether we will need to do an IISReset or Application Pool Recycle once we use Mount-SPContentDatabase powershell commandlets to mount the database.
      In our test environment, without doing IISReset and Application Pool Recycle, we were able to browse the site collection which was part of the newly mounted Content Database. However, we don't know  what should be the ideal solution for our production
    farm.
    Thanks, Bhadr :) Mark as Answer if it solves your problem. Vote As Helpful if the post is helpful for you.

    If you're removing a content database that contains the same site collections as the database you're adding, it is possible that you may need to do an IISReset.
    Unlikely, though.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Why aren't my album cover arts being synced after updating to ios5?

    They display fine in the iTunes library.
    It only started happening after upgrading to ios.
    Any solutions?
    Thanks for your time.
    (iPod touch 4gen)

    Just updating the discussion with the current events.
    After fixing the problem and having it fixed for about a month, iTunes decided to resync all my library and deleted about a third of my albums' artwork. Even though I use manual sync, all my albums were still on my hard drive and they all had their covers correctly assigned.
    This is certainly a bug on either ios5 or iTunes 10.5.1

  • IIS Recycle times for Service Application App pool / Reporting Services 2012 memory

    Hello,
    On our SharePoint application servers we run the Reporting Services 2012 in SharePoint integrated mode. For the Reporting Services SharePoint sets up a own App Pool.
    Now we found, that this App Pool for Reporting Services takes all the memory of the server. Usually the SharePoint Web Application App Pool are recycled at night. The Service Application App Pools are not ? I'm confused.
    Of course, if an App Pool does not recylce it takes all memory it gets.
    >> But why is the recycling option in IIS not set for SharePoint Service Application pools? Does any know if we can just set recycle times, like for the Web Application app pools?
    Thanks in advance community.
    Benjamin

    You may want to consider limiting the amount of memory to be allocated to SSRS by editing C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\WebServices\Reporting\rsreportserver.config and changing the value of <MemoryThreshold>.
    This value is in percent. SSRS evaluates the amount of memory on service startup and will allocate up to this percentage of memory to SSRS.
    You also may want to consider increasing the amount of memory available on that SharePoint server.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • CR XI R2 "Database Login Failed" Recycled application pool and now it works

    Hello,
    I have a web application using CR XI R2 that has several reports which are pushed a dataset.  These reports have been runing fine until today when I received an error stating "Database login failed."  "Object reference not set to an instance of an object" in the report viewer control. 
    I recycled the application pool and the reports started working again. 
    My questions are:
    What could be the cause of this and how can it be avoided?
    Why does recycling the application pool correct the problem?
    Regards.

    Hi Tom,
    Recycling keeps problematic applications running smoothly, especially when it is not feasible to modify the application code. Recycling helps ensure that problematic applications do not cause other applications to fail, and that system resources can be recovered from unhealthy applications.
    Recycling an application pool causes the WWW service to shut down all running worker processes that are serving the application pool, and then start new worker processes. Whether the WWW service starts the new worker processes before it stops the existing one depends on the DisallowOverlappingRotation property in the metabase. Recycling an application pool does not alter any state in HTTP.sys or change any configuration in the metabase.
    Note:
    When an application pool is serviced by more than one worker process, the recycle operation is staggered in some scenarios. Only when a worker process is recycled on demand or when all of the worker processes hit their memory limits at the same time would they be restarted simultaneously.
    For more info regarding this have a look to this [article|http://blogs.msdn.com/david.wang/archive/2006/01/26/Thoughts-on-Application-Pool-Recycling-and-Application-Availability.aspx]
    Regards,
    Shweta

  • Is one application pool preferred for all sharepoint service applications(

    is one application pool preferred for all SharePoint service applications ? 
    I have a three-tier architected SP 2013 small farm (NLT, 2 wfe, 1 app server, 1 db server). All services will be use (Secure Store,Service Application, Managed Metadata Service Application, Search Service Application,User Profile Service Application,App
    Management Service Application,Workflow Manager,Excel Service Application,BI Reporting Service Application,Power Pivot Service,Performance Point,Visio Services,BCS Service application)
    I am unclear on the following:
    which servers should host which service ? and why ?
    Is one application pool account preferred for all SP service Applications ? if not which service applications should be logically group ? and why ?

    Creating additional application pools requires more RAM memory.  About 100-150 MB per app pool.  But it also keeps things happening in one app pool from affecting another.  So normally you create additional app pools when you want to maintain
    higher service levels on one component versus another.  For example.  Let's assume that your service levels designate that you could survive a 3 hour outage of Search but that Managed metadata must be constantly available with minimal downtime.  Then
    you would put Search and MMS in separate App Pools.  Otherwise there is no real advantage to splitting them up.
    Services that are accessed directly by user request, like Search Query, Managed metadata, user profile should go on the Web Front ends.  Services that process heavier intermittent loads are normally placed on a dedicated application server to keep them
    from affecting overall performance, for example Excel Services.  But its more of an art form rather than a science and depends a lot on your performance needs, your hardware, and your usage.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Security Token Service application not working

    Trying to use secure store service to access userprofileservice.asmx methods within Infopath 2010 form(doesn't contain any managed code). Created tareget application and using udcx file within the data connection library according to Microsoft tech articles.
    I see errors related to accessing securitytokenservice application.It keeps on erroring out within the ULS logs, something like below
    http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas.
    TCP error code 10061: No  connection could be made because the target machine actively refused it ::1:32843
    Used below links but no luck.
    Method 2 of http://support.microsoft.com/kb/981684
    http://support.microsoft.com/kb/2493524
    http://www.avanadeblog.com/sharepointasg/iis/
    My http://localhost works but i don't see
    http://localhost:32843 working.
    When i run netstat -a within command prompt i see port 32843 is working since the state of it is shown as "listening".
    When i browse to
    http://localhost:32843/SecurityTokenServiceApplication i see HTTP 404 error.
    It is same with other services  under SharePoint Web Services Site within IIS.
    I see the same HTTP 404 error. The Security Token Service application pool is running.
    I'm trying to make this work within my development envirnoment and  i don't see the security token service application
    working in my Production or test environment either. I have a standalone installation on my personal laptop and i don't see these things working there as well. If i had web.config file of a working Security token service application then i could have compared
    that with the web.config on my developement box. This is the only thing i missed out on.
    I'm kind of stuck with this since last one week and any help is appreciated.
    Thanks, DC SharePointer

    thanks Henrik.
    Farm Servers already have WCF Hotfix (976462) and I also checked the STS authentication settings in IIS. Only windows and Anonymous access is enabled. I did make the change(Authentication mode of spStsActAsBinding to IssuedToken, it was SspiNegotiatedOverTransport) that
    is suggested in the link you provided. But no luck. My STS web.config has below membership and role providers
     <system.web>
        <membership>
          <providers>
            <add connectionStringName="DevSQLConn"
     applicationName="/"
     name="DevAspNetSqlMembershipProvider"
     requiresQuestionAndAnswer="false"
     type="System.Web.Security.SqlMembershipProvider,System.Web,Version=2.0.3600.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" />
          </providers>
        </membership>
        <roleManager enabled="true">
          <providers>
            <add connectionStringName="DevSQLConn"
     applicationName="/"
     name="DevAspNetSqlRoleManager"
     type="System.Web.Security.SqlRoleProvider,System.Web,Version=2.0.3600.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" />
          </providers>
        </roleManager>
      </system.web>
    Does this have to do anything with my issue. I think at some point they might have configured to use form based authentication.
    Thanks, DC SharePointer

  • Which account is running what service, app pool etc.

    HI all,
    Does anyone know if there is a quick and easy way to establish which domain account is running what service/app pool etc. within the farm?
    Thanks in advance.

    Hi Geoff,
    The Configure Service Accounts page gets its information from different sources I believe:
    - Farm Account
    - Windows Services related to SharePoint
    - Web Application Pools (Accounts running your Web Applications)
    - Service Application Pools (Accounts that are running your Service Applications)
    In order to retrieve this information, you would have to create a script that would do the same.
    I don't have a script for that. Maybe someone else already has this script.
    Nico Martens - MCTS, MCITP
    SharePoint Infrastructure Consultant / Trainer

  • Net.Msmq Binding Not Picking Up Messages in Queue as soon as the application pool gets recycled

    Hi,
    We are trying to implement a wcf service that exposes a net.msmq endpoint.  We are running windows server 2008 R2/IIS 7.5 running on a DOMAIN mode.
    1. Our service is called service.svc and it is deployed under an application called Test in the default website (application pool running under network service)
    2. The url to reach the service webpage is http://machinename/Test/service.svc.
    3. We created a private queue called Test/service.svc and we configured permissions for network service to full control.
    Now, when the application pool is "alive" the service picks up the messages correctly, but as soon as the application pool gets recycled (because of timeout or any other reason), the service stops picking up the messages, that just sit in the queue until the service starts again by browsing to the service webpage (http://machinename/Test/service.svc)
    I know this is a popular question, but I already tried several solutions with no luck (for example, we triedhttp://keithelder.net/blog/archive/2009/06/03/fix-for-wcf-netmsmqbinding-not-picking-up-messages-in-queue.aspx,http://www.codewrecks.com/blog/index.php/2009/03/17/hosting-a-wcf-service-based-on-msmq-in-iis7/,http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/a1df55c4-e642-442a-9057-f0aec278d10c/ and other ones)
    Any Help?
    If this post is helpful, please mark it as such
    Alessandro Cardoso
    MVP | Microsoft Heroes | MCT
    blog: http://itaustralia.spaces.live.com
    http://cardosoalessandro.spaces.live.com

    Hi Steven,
    I am Alessandro's colleague, I am working with him on these net.msmq issues. 
    Our configuration includes a transactional queue called Test/Service.svc (unauthenticated,
    we shut down all security for the moment...does it matter?) and these attributes on the service:
    [ServiceContract]
    public interface IService
    [OperationContract(IsOneWay=true)]
    void ProcessMyMessage(MyClass parameter);
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, TransactionIsolationLevel = IsolationLevel.Serializable, TransactionTimeout = "00:03:00")]
    public class Service: IService
    [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]
    public void ProcessMyMessage(MyClass parameter)
    //Do some stuff here
    The service is hosted on IIS 7.5 under an application called Test (so that the full http address of the service is http://machine/Test/Service.svc).
    In the configuration (for both client and service) we specified None for the security mode, "true" value in durable and exactlyOnce
    The Net.msmq Listener Adapter windows service is running fine under the Network Service account (the same as our application pool)
    Is there something we are missing?
    Also, can you explain how a transaction not configured properly can create this behaviour? In my understanding the process of delivering a message happens in 3 steps (I remember a nice picture of this the Juval Lowy book):
    1) Transaction 1: client delivers message to local instance of msmq. The transaction rolls back if the message does not get delivered.
    2) Transaction 2: the local instance of msmq delivers the message to the remote (service) instance of msmq. The transaction rolls back if the message does not get delivered.
    3) Transaction 3: wcf activates my service which picks up the message and process it. The transaction rolls back if the service fails to pick up the message or does not complete the transaction (for example, because of an unhandled exception).
    The message gets delivered to the service machine successfully, so I am assuming that steps 1 and 2 are executed correctly. If my service was not configured to handle transaction properly, wcf should still activate it and do something with it. Or at least,
    if it doesn't get activated at all, this should be the case even when the application pool is well alive and awake, because it should be a configuration problem. Instead, the service works great if the appPool is alive and it never gets activated when the
    appPool is sleeping (absolute nothing in the .svclog trace file generated by the service). Am I saying something wrong?

  • Changed SP application pool service account - 500 internal server error

    Hi all, 
    Trying to resolve some farm installation issues in our test environment. Long story short is that on install a previous user used our SP_Farm account to install everything and pretty much use this account to run all web applications/services.
    So I am in the process of trying to resolve one portion of it by allocating a new managed account for the web application pools. I have created a new account called SP_Pool on the DC. This is just a domain user with no specific rights applied (classic authentication).
    I changed the account using CA "configure service accounts" for both our mysite and SharePoint site web apps. 
    SP applied the new SP_Pool to the appropriate workstation groups and DB rights. Tried to hit the site and got the rather generic HTTP 500 Internal Server error. Put SP_Pool into the local admin rights group to test and was able to hit the site so something
    is definitely pointing to a rights/permission issue. I was under the impression the app pool accounts did not require any local SP server rights? I have seen mention of "Impersonate a client after authentication" but that's only for Claims based
    auth
    I've gone through every scenario which are mentioned below:
    Tried to connect from a client machine and server. 500 error
    All App pools are started and SP_Pool is running both web apps
    IIS bindings are same as before
    no changes to the web.config
    No errors in the Application event viewer
    Checked iis logs and has 500 errors throughout it. The 4th number in the sequence usually changes (i.e. 500 0 0 499, 500 0 0 468 etc)
    Turned on Failed Request Tracing and no issue has come up
    Tried to clear the configuration cache - same deal
    Ran process mon - seen nothing out of the ordinary
    So based off the above is there anywhere else I could look to try and resolve this issue? Or is there something so damn obvious I've missed here? Running out of ideas
    Appreciate any feedback
    Thanks

    Hello,
    Have you tried to turn your SharePoint server off and on again ( I know , it sounds like a basic helpdesk answer but in the case of changing user account for application pool, it already fixed the issue for me)
    Best regards, Christopher.
    Blog |
    Mail
    Please remember to click "Mark As Answer" if a post solves your problem or
    "Vote As Helpful" if it was useful.
    Why mark as answer?

  • Error occurred in deployment step 'Recycle IIS Application Pool': Could not load file or assembly 'Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specif

    Hi All,
    I am using Virtual box to connect to Sharepoint 2013 VPC. Due to an unexpected sutdown of my machine the VPC got some issue. Now I restored it using my bak up file. But after this when I deploy my sharepoint 2013 farm solution Iam getting the following error.
    Error occurred in deployment step 'Recycle IIS Application Pool': Could not load file or assembly 'Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified..
    Editing the web.config and adding dependentAssembly didnt worked for me.
    What could be the issue? Any suggestions ?
    Thanks in advance...
    Regards
    Nimisha
    [email protected]

    Hi,
    Please try to do as follows:
    1. Check your farm solution whether reference the Microsoft.SharePoint.dll. Or try to add the Microsoft.SharePoint.dll into the bin folder.
    2. Execute the iisreset command.
    3. Create a new farm solution and check whether the issue still occurs or not.
    Best Regards
    Dennis Guo
    TechNet Community Support

Maybe you are looking for