Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.
This repository was archived by the owner on Dec 8, 2021. It is now read-only.

Possible Memory leak #218

Open
Open
@dwinshipIdentifi

Description

@dwinshipIdentifi

Polaris Bug Report

Description of the bug

We have Polaris running in a windows container and over time it is consuming more memory.

A clear and concise description of what the bug is.

Steps to reproduce

Steps to reproduce the behavior:
Start Polaris as a windows container and monitor memory. At this point we aren't actively using the REST API.

Expected behavior

Start container and the amount of memory to start the process should be used and stay at a consistent amount.

Additional context

Dockerfile we are using
FROM mcr.microsoft.com/powershell:lts-nanoserver-1809

USER ContainerAdministrator

RUN setx /M PATH "%PATH%;C:\Program Files\PowerShell"

SHELL ["pwsh", "-Command"]

COPY artifacts C:

RUN ["pwsh.exe", "C:\bootstrap.ps1"]

Expose 8080

cmd C:\Invoke-Polaris.ps1

Entrypoint Script
Import-Module Polaris
New-PolarisGetRoute -Path "/test" -Scriptblock {
$Response.Send('DEVOPSAPI is running');
}

New-PolarisGetRoute -Path "/customers" -Scriptblock {
$getCust = "C:\scripts\get-customers.ps1" | Invoke-Expression
$Response.Json($getCust);
}

New-PolarisGetRoute -Path "/customers/:cid/workflows" -Scriptblock {
$cid = $Request.Parameters.cid
$getWFs = "C:\scripts\get-workflows.ps1 -CID $cid" | Invoke-Expression
$Response.Json($getWFs);
}

New-PolarisGetRoute -Path "/customers/:cid/workflows/:wfkey/steps" -Scriptblock {
$cid = $Request.Parameters.cid
$wfkey = $Request.Parameters.wfkey
$getSteps = "C:\scripts\get-workflow-steps.ps1 -CID $cid -WFKEY $wfkey" | Invoke-Expression
$Response.Json($getSteps);
}

$app = Start-Polaris

while($app.Listener.IsListening) {
Wait-Event callbackcomplete
}

Version Information


Run the following script and copy and paste the results here:

$Version = [pscustomobject]$PSVersionTable
$Version.PSCompatibleVersions = ($Version.PSCompatibleVersions | foreach { "$($_.Major).$($_.Minor).$($_.Build).$($_.Revision)" }) -join ",  "
(Get-Module Polaris | select Name,Version | ConvertTo-Html -Fragment | Out-String) + ($Version | ConvertTo-Html -Fragment | Out-String)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions