Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

What format should TimeSpan values be in for Ensure-AppPool



  • Using 5.6.1 (Build 3)

    I'm having trouble specifying the parameters of Ensure-AppPool that are of type TypeSpan.

    If I use simple integers then I get the following error: Timespan value must be between 00:00:00 and 1.00:00:00 seconds inclusive, with a granularity of 60 seconds

    If I use the format shown in the error message above then I get the following error message: Cannot convert value "00:05:00" to TimeSpan type.

    Product: BuildMaster
    Version: 5.6.1



  • When a Configuration or Operation has a TimeSpan property, then it is parsed as a double and built using TimeSpan.FromSeconds. However, the TimeSpanUnitAttribute can change this from Seconds to Minutes if it's defined.

    Which property is this for? I tried for several and it seems to work ok.

    FYI here is the code: IisAppPoolConfiguration.cs



  • The Ensure-AppPool instance that causes the error is shown below and the error I get follows. I've done some testing but it still isn't clear to me which of the TimeSpan properties is causing the error.

    Ensure-AppPool $iisAppRootAppPoolName ( Runtime: v4.0, Enable32BitAppOnWin64: true, Pipeline: Integrated, AutoStart: true, QueueLength: 1000, State: Started, IdentityType: ApplicationPoolIdentity, CpuLimit: 0, CpuAction: NoAction, CpuResetInterval: 5, CpuSmpAffinitized: false, CpuSmpProcessorAffinityMask: 4294967295, CpuSmpProcessorAffinityMask2: 4294967295, IdleTimeout: 20, LoadUserProfile: false, MaxProcesses: 1, PingingEnabled: true, PingResponseTime: 90, PingInterval: 30, ShutdownTimeLimit: 90, StartupTimeLimit: 90, OrphanWorkerProcess: false, LoadBalancerCapabilities: HttpLevel, RapidFailProtection: true, RapidFailProtectionInterval: 5, RapidFailProtectionMaxCrashes: 5, DisallowOverlappingRotation: false, DisallowRotationOnConfigChange: false, PeriodicRestartPrivateMemory: 0, PeriodicRestartTime: 1740, PeriodicRestartRequests: 0, PeriodicRestartMemory: 0 );

    Error: Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: Timespan value must be between 00:00:00 and 1.00:00:00 seconds inclusive, with a granularity of 60 seconds



  • The problem is the CpuResetInterval parameter; it is missing the attribute to identify minutes, so it is treating it as seconds. I fixed this here, and it will be fixed in the next release of the extensionhttps://github.com/Inedo/inedox-windows/issues/10

    AS a work-around, you can just specify the value in seconds (300 instead of 5). But this will become 300 minutes after you upgrade, so might be best to not set it for now.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation