Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sudipta Das 13 posts 104 karma points
    Jul 25, 2017 @ 05:27
    Sudipta Das
    0

    Scheduled publishing task crashing the app pool and the website

    Our production website built on Umbraco v7.2.6 runs on a load balanced environment where the load is distributed into two IIS servers called "web01" and "web02". But once in a while the IIS app pool crashes bringing down the website with it. When I visit the log files just after a crash I can see errors related to scheduled publishing has been registered. I am not sure how to fix the issue. Is there an way to disable the scheduled publishing task?

    Settings in Umbraco settings.config is below:

      <scheduledTasks baseUrl="web01.website.com/umbraco/">
      </scheduledTasks>
      <distributedCall enable="true">
        <user>0</user>
        <servers>
          <server>web01.website.com</server>
          <server>web02.website.com</server>
        </servers>
      </distributedCall>
    

    The errors logs shows as below:

    2017-07-25 14:56:35,149 [27] ERROR Umbraco.Web.WebServices.ScheduledPublishController - [T32/D3] Error executing scheduled task
    System.UnauthorizedAccessException: Access to the port is denied.
       at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
       at System.Threading.Semaphore..ctor(Int32 initialCount, Int32 maximumCount, String name)
       at Umbraco.Core.AsyncLock..ctor(String name)
       at umbraco.content.InitializeFileLock()
       at umbraco.content..ctor()
       at umbraco.content.<.cctor>b__17()
       at System.Lazy`1.CreateValue()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Lazy`1.get_Value()
       at Umbraco.Web.WebServices.ScheduledPublishController.Index()
    2017-07-25 14:56:35,165 [27] ERROR Umbraco.Web.Scheduling.ScheduledPublishing - [T11/D3] An error occurred with the scheduled publishing. The base url used in the request was: http://web01.website.com/umbraco/, see http://our.umbraco.org/documentation/Using-Umbraco/Config-files/umbracoSettings/#ScheduledTasks documentation for details on setting a baseUrl if this is in error
    System.Net.WebException: The remote server returned an error: (400) Bad Request.
       at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)
       at System.Net.WebClient.UploadString(Uri address, String method, String data)
       at Umbraco.Web.Scheduling.ScheduledPublishing.PerformRun()
    
  • Sudipta Das 13 posts 104 karma points
    Jul 28, 2017 @ 01:05
    Sudipta Das
    0

    Any suggestions? What is ScheduledPublishController trying to do? What kind of permissions do I have to provide?

  • Nicholas Westby 2045 posts 7032 karma points c-trib
    Jul 25, 2021 @ 18:51
    Nicholas Westby
    0

    I'm coming across this issue as well in a very recent version of Umbraco 7 (7.15.5):

     2021-07-25 11:35:54,674 [P6104/D1085/T1] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
    System.UnauthorizedAccessException: Access to the port is denied.
       at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
       at System.Threading.Semaphore..ctor(Int32 initialCount, Int32 maximumCount, String name)
       at Umbraco.Core.AsyncLock..ctor(String name)
       at Umbraco.Core.MainDom..ctor(ILogger logger)
       at Umbraco.Core.ApplicationContext.Init()
       at Umbraco.Core.CoreBootManager.CreateApplicationContext(DatabaseContext dbContext, ServiceContext serviceContext)
       at Umbraco.Core.CoreBootManager.Initialize()
       at Umbraco.Web.WebBootManager.Initialize()
       at Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e)
    

    I suspect it happens just after the website gets taken offline momentarily for nightly backups, but it doesn't happen every night.

    In my case, I am not on a load balanced environment, and it seems to happen on startup rather than via scheduled tasks.

Please Sign in or register to post replies

Write your reply to:

Draft