Skip to content

System.IO.IOException: Not enough storage is available to process this command : 'PSReadLineHistoryFile_ #833

Closed

Description

@CtrlShiftEscape

Environment data

PS version: 6.2.0-preview.3
PSReadline version: 2.0.0-beta3
os: Linux localhost 3.10.72+ #1 SMP PREEMPT Thu Jun 8 22:09:59 CST 2017 aarch64 GNU/Linux
PS file version:

Steps to reproduce or exception report

Start PowerShell.
After it starts, it prints:

Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new

Last 0 Keys:


Exception:

System.IO.IOException: Not enough storage is available to process this command : 'PSReadLineHistoryFile_-1378073468'
   at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
   at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize()
   at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)

It also prints this after every command
And autocomplete and history don't work

Activity

  1. agirko commented on Dec 27, 2018

    @agirko

    Had the same issue.
    Seems that C:\Users%USERNAME%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt is about 7GB is size. Deleted it and things went back to normal.
    This also helps to keep dupes out:
    'Set-PSReadlineOption -HistoryNoDuplicates:$true' | Add-Content $PROFILE

  2. CtrlShiftEscape commented on Dec 30, 2018

    @CtrlShiftEscape
    Author

    Mine is empty

    > Get-Item (Get-PsReadlineOption).HistorySavePath
    
    
        Directory: /home/user/.local/share/powershell/PSReadLine
    
    Mode                LastWriteTime         Length Name
    ----                -------------         ------ ----
    ------          12/14/18 10:53 PM              0 ConsoleHost_history.txt
    
  3. SteveL-MSFT commented on Jun 18, 2019

    @SteveL-MSFT
    Member

    CtrlShiftEscape you do have free diskspace where it's trying to write that file as well as permissions to that location to write?

  4. ghost closed this as completedon Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions