3

I have a large application running on a bunch of machines. Once every 5 minutes it copies a file to do some manipulation on it.

The code works without a hitch almost 99.9% of the time but once every few hours I might get the error discussed here.

Here's the code:

try
 {
  File.Copy(fullPathName, readPathName, true);
 }
catch (Exception exception)
 {
 ....
 }

This code runs in its own thread but should only be one of these threads running. Here's the error I get:

Encountered an unexpected exception when trying to create the .tmp file. Not enough quota is available to process this command.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at ....

Luke Belbina
  • 5,708
  • 12
  • 52
  • 75
  • We got part of your stack trace, but the actual error seems to be missing. – Merlyn Morgan-Graham Mar 24 '11 at 06:34
  • Quota can be user space or user memory. Check if there are any limiting settings on the user and on the drive you're working on. – CodingBarfield Mar 24 '11 at 11:08
  • This question may be useful / interesting http://stackoverflow.com/questions/12584619/mysterious-not-enough-quota-is-available-to-process-this-command-in-winrt-port – Dave Jan 02 '14 at 18:38

4 Answers4

2

Not enough quota is available to process this command means that your system was running low on resources. It's hard to tell what the problem was exactly, but there's almost certainly nothing your code can do but retry the operation.

Gabe
  • 84,912
  • 12
  • 139
  • 238
  • Out of all the answers so far, this seems most logical to me. Quota (in the context of file I/O) could be referring to the disk space available to the user. Though it's hard to tell what the problem would be without more details. – Jeff Mercado Mar 24 '11 at 06:51
  • @Jeff: Actually, if low quota was referring to disk space, I'm pretty sure it would show up as a "full disk" type of error. In this case I think it's probably referring to some sort of page/nonpage pool shortage or something like that. – Gabe Mar 24 '11 at 06:53
  • I'm not sure about that. A "full disk" space error would be misleading I think. As the disk wouldn't really be full, just that you (the user) are not allowed to write any more to it as you've exceeded your quota. And this seems like a more probable situation than any of the others. But this is all speculation on my part, hopefully neo will give us more details on the problem. – Jeff Mercado Mar 24 '11 at 07:02
0

Please check the user permission to write the file. It may be causing due to insufficient user rights to create or overwrite the file.

Nirmal
  • 1,223
  • 18
  • 32
0

Check if your file is not locked by other process. You can easily do it with Process Explorer

Paweł Smejda
  • 1,879
  • 1
  • 17
  • 25
0

This sounds like you either have a memory leak in your application, or too little memory set up on your (virtual?) machine.

See this link: http://msdn.microsoft.com/en-us/library/ms820778.aspx

Merlyn Morgan-Graham
  • 58,163
  • 16
  • 128
  • 183