Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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

    Scheduled Pinned Locked Moved Support
    buildmaster
    4 Posts 1 Posters 4 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            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.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation