Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
CtrlShiftEscape opened this issue Dec 15, 2018 · 4 comments

Comments

@CtrlShiftEscape
Copy link

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

@agirko
Copy link

agirko commented Dec 27, 2018

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

@CtrlShiftEscape
Copy link
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

@SteveL-MSFT
Copy link
Member

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

@ghost
Copy link

ghost commented Feb 7, 2020

This issue is closed because it has been marked as requiring author feedback but has not had any activity for 14 days. If you think the issue is still relevant, please reopen and provide your feedback.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants