Java.io.IOException : Not enough space  when I use Runtime.getRuntime().exe

Hi All,
I am calling a shell script from the java using the Runtime class, the job of the shell script is to zip some content which is huge in size(max 500MB) while invoking the shell script i will give the arguments source & destination. I am using the waitFor() so that my java program will wait untill the shell script execution is over. Everything is working as expected but some times it's giving Exception java.io.IOException : Not enough space
What could be the reason for getting this kind of error ? Your suggestions are more appreciated.
Thanks,
Krishna Rajendra A.

I don't know what the problem is but make sure you follow the advice for stdout and stderr in http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html because I bet the output from stdout or stderr will tell you what your problem is.

Similar Messages

  • Java.io.IOException: Not enough space  when running external command

    Hi All,
              I am trying to call gzip utility from my servlet.
              The code line is as below :
              Runtime runtime = Runtime.getRuntime();
              Process process = runtime.exec("gzip -f -9 " +fileName);
              I got the following error :
              java.io.IOException: Not enough space
              I even tried to use the actual path of gzip in the code :
              Runtime runtime = Runtime.getRuntime();
              Process process = runtime.exec("/usr/bin/gzip -f -9 "
              +fileName);
              But still I got the same error.
              Can anyone tell me what I am missing out.....
              Thanks.
              Peter Vennel
              

    We just ran into this problem yesterday. For us, it seemed to be a disk
              space problem. If you run "df -k" you'll see how full your file systems
              are. We cleared out some of the /var/log (capacity was 80%) files reducing
              capacity to 50% and the problem went away, for now.
              Jim Clark
              Idea Integration
              http://www.idea.com
              "Joseph Weinstein" <[email protected]> wrote in message
              news:[email protected]...
              > Hi Pete,
              > It seems to me that your JVM is just running out of space. The JVM has
              default
              > limits on the amount of memory (java or native) that it will take from the
              OS,
              > and you're hitting one of those limits. How are you starting the WebLogic
              > server? If it's by the startWebLogic script, or other such, try adding, or
              altering
              > the arguments to the invocation of java, to allow more memory.
              >
              > Joe Weinstein at BEA, the home of Weblogic
              >
              > Peter Vennel wrote:
              >
              > > This is the exception I got at the server side. Does anyone know what
              this
              > > mean ....
              > >
              > > java.io.IOException: Not enough space
              > > at java.lang.UNIXProcess.<init>(Compiled Code)
              > > at java.lang.Runtime.exec(Compiled Code)
              > > at java.lang.Runtime.exec(Compiled Code)
              > > at JSOliDocument.service(Compiled Code)
              > > at javax.servlet.http.HttpServlet.service(Compiled Code)
              > > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled
              Code)
              > > at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              > > Code)
              > > at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
              > > Code)
              > > at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code)
              > > at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
              > > at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
              > >
              > > Peter Vennel <[email protected]> wrote in message
              > > news:[email protected]...
              > > > Hi All,
              > > >
              > > > I am trying to call gzip utility from my servlet.
              > > >
              > > > The code line is as below :
              > > >
              > > > Runtime runtime = Runtime.getRuntime();
              > > > Process process = runtime.exec("gzip -f -9 " +fileName);
              > > >
              > > > I got the following error :
              > > >
              > > > java.io.IOException: Not enough space
              > > >
              > > > I even tried to use the actual path of gzip in the code :
              > > >
              > > > Runtime runtime = Runtime.getRuntime();
              > > > Process process = runtime.exec("/usr/bin/gzip -f -9 "
              > > > +fileName);
              > > >
              > > > But still I got the same error.
              > > >
              > > > Can anyone tell me what I am missing out.....
              > > >
              > > >
              > > > Thanks.
              > > >
              > > >
              > > > Peter Vennel
              > > >
              > > >
              > > >
              >
              > --
              >
              > PS: Folks: BEA WebLogic is in S.F., and now has some entry-level positions
              for
              > people who want to work with Java and E-Commerce infrastructure products.
              Send
              > resumes to [email protected]
              > --------------------------------------------------------------------------
              > The Weblogic Application Server from BEA
              > JavaWorld Editor's Choice Award: Best Web Application Server
              > Java Developer's Journal Editor's Choice Award: Best Web Application
              Server
              > Crossroads A-List Award: Rapid Application Development Tools for Java
              > Intelligent Enterprise RealWare: Best Application Using a Component
              Architecture
              > http://weblogic.beasys.com/press/awards/index.htm
              >
              >
              

  • Java.io.IOException: Not enough space  - Weblogic 8.1 on Solaris 8

    Hi,
    We get "java.io.Exception: Not enough space" sometimes when trying to access
    JSPs hosted on Weblogic 8.1 on Solaris 8. It looks like a problem because of
    increased swap space usage. What should we do to get rid of this issue
    Compilation of '.......java' failed:_____
    (Failed to parse compiler output. See full output below). ____
    Full compiler error(s):
    java.io.IOException: Not enough space
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:52)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:566)
    at java.lang.Runtime.exec(Runtime.java:491)
    at java.lang.Runtime.exec(Runtime.java:457)
    at weblogic.utils.Executable.exec(Executable.java:227)
    at weblogic.utils.Executable.exec(Executable.java:156)
    at weblogic.utils.Executable.exec(Executable.java:142)
    at
    weblogic.utils.compiler.CompilerInvoker.execCompiler(CompilerInvoker.java:249)
    at
    weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:427)
    at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:328)
    at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:336)
    at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:321)
    at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:443)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:238)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:188)
    at
    weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:535)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:373)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
    at
    weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6452)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    Thanks,
    Abhijeet Dev

    Hello,
    I had the same problem and I eradicated it by changing used % of /tmp dir from 97% to 81% by removing unwanted files in /tmp folder.
    Try it out......
    df -k
    Now u will see that ur swap space is not sufficient.Check the corresponding mounting directory.Remove unwanted files from this dir. Restart ur server.Your problem should be solved.Note: Restarting server is not needed but for safe side restart ur server.
    In mine case, my dir was /tmp.I removed all unwanted files and then the problem was solved.
    Thanks
    Chandra

  • Java.io.IOException: Not enough space at sun.nio.ch.FileChannelImpl.map0(Na

    Hi
    I am getting this error
    java.io.IOException: Not enough space
    at sun.nio.ch.FileChannelImpl.map0(Native Method)
    at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:728)
    I ahve a shell script which spawn three jvms
    Two jvms have XMX=12288M
    and the third XMX=10240M
    Basically each jvm has around 12 threads to read in xml files and process them.
    The HP machine has around 70 GB RAM.
    So, in total the java uses around 36 GB only but still it crashes.
    I then change the xml files so that the third jvm does not read any files
    but it is just spawned for the sake of it.
    Even then it crashes with the same error.
    Any idea what can be done to fix this.
    Thanks

    i have OSF DCE 1.1/HP DCE 1.8I'm afraid I'm not familiar with that.
    Other than the comments I posted above,
    perhaps ask on HP user groups to find tips
    on increasing the available memory?
    Oh, another thing: when you issue "java -Xmx", you are specifying
    the desired amount of memory. But in UNIX, there is a per-user upperlimit.
    Try typing "ulimit -a" on a command line, and it will
    tell you a hard limit that was configured by the machine's administrator.
    Eg. I have 4G on my machine, but by default, my user account
    is limited to 512M per process (and no matter what I type in Xmx,
    my java process cannot exceed the hard limit set by my
    administrator)
    % ulimit -a
    core file size (blocks, -c) 0
    data seg size (kbytes, -d) 524288
    file size (blocks, -f) unlimited
    max locked memory (kbytes, -l) unlimited
    max memory size (kbytes, -m) unlimited
    open files (-n) 11095
    pipe size (512 bytes, -p) 1
    stack size (kbytes, -s) 65536
    cpu time (seconds, -t) unlimited
    max user processes (-u) 5547
    virtual memory (kbytes, -v) unlimited

  • Java.io.IOException: Not enough space

    Hi,
    I get the following error after running Weblogic 4.5.1 on Solaris 2.7 (1GB
    Ram). for a couple of days.
    At first I thought it was running out of File Descriptors. I increased them
    to 4096 from 1024.
    But the problem still exists. I am unable to find any help in the
    documentation.
    Any help on this is greatly appreciated.
    Thanks,
    Sai
    *******************Start of Error MEssage****************************
    Tue Jun 20 10:09:50 CDT 2000:<I> <ServletContext-Servlets>
    weblogic.servlet.JSPServlet: Generated java file: /space/weblogic/s
    hop_server_com/jspclasses/jsp_servlet/_big/_DisplayItemList.java
    Tue Jun 20 10:09:50 CDT 2000:<E> <ServletContext-Servlets>
    weblogic.servlet.JSPServlet: Compilation of /space/weblogic/shop_
    server_com/jspclasses/jsp_servlet/_big/_DisplayItemList.java failed:
    java.io.IOException: Not enough space
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.forkAndExec(Compiled Code)
    at java.lang.UNIXProcess.<init>(Compiled Code)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.execInternal(Compiled Code)
    at java.lang.Runtime.exec(Compiled Code)
    at java.lang.Runtime.exec(Compiled Code)
    at weblogic.utils.Executable.exec(Compiled Code)
    at weblogic.utils.Executable.exec(Compiled Code)
    at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled
    Code)
    at weblogic.utils.compiler.CompilerInvoker.compile(Compiled Code)
    at weblogic.servlet.JSPServlet.compilePage(Compiled Code)
    at weblogic.servlet.JSPServlet.getStub(Compiled Code)
    at weblogic.servlet.JSPServlet.service(Compiled Code)
    at javax.servlet.http.HttpServlet.service(Compiled Code)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled
    Code)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
    at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
    ************************End of Error Message*****************

    I had the same problem before. Increase the swap space, if it is too small, increase it.
    Vince
    "Michael Reiche" <[email protected]> wrote:
    >
    This is the operating system running out of swap space. Recompiling JSP in 4.5.1 wastes a lot of memory.
    If you run /usr/proc/bin/pmap -x <pid> you will likely see that the 'heap' segment is very large.
    Mike
    "Bengt Bäverman" <[email protected]> wrote:
    I have also seen this, missleading, message.
    I believe that we decreased our heap size from above 1GB to just below. I
    remember looking at the Java code for java.io and I could not find any
    string with that wording, so it must come from the operating system.
    Bengt Baverman
    [email protected]
    "Vinod Shah" <[email protected]> skrev i meddelandet
    news:[email protected]...
    I have seen this with WL 4.5.1 and Solaris 2.6. Make sure you
    are using the -native flag to use native threads when starting
    the JVM. In my case this solved the problem. The
    "java.io.IOException: Not enough space" message
    fooled me too.
    Vinod Shah
    "Srikant Subramaniam" <[email protected]> wrote in message
    news:[email protected]...
    Here's why I think you're running out of disk space:
    weblogic.servlet.JSPServlet: Compilation of
    /space/weblogic/shop_server_com/jspclasses/jsp_servlet/_big/_DisplayItemList
    .java
    failed:
    java.io.IOException: Not enough space
    saiprasadp wrote:
    Hi,
    Definitely not. There is more than 13 Gig left (unused) on the
    partition
    where weblogic is installed and more than
    4 Gig in /tmp.
    Sai
    Srikant Subramaniam <[email protected]> wrote in message
    news:[email protected]...
    Could you be running out of disk space?
    Srikant.
    saiprasadp wrote:
    Hi,
    I get the following error after running Weblogic 4.5.1 on Solaris
    2.7
    (1GB
    Ram). for a couple of days.
    At first I thought it was running out of File Descriptors. I
    increased
    them
    to 4096 from 1024.
    But the problem still exists. I am unable to find any help in the
    documentation.
    Any help on this is greatly appreciated.
    Thanks,
    Sai
    *******************Start of Error
    MEssage****************************
    Tue Jun 20 10:09:50 CDT 2000:<I> <ServletContext-Servlets>
    weblogic.servlet.JSPServlet: Generated java file:
    /space/weblogic/s
    hop_server_com/jspclasses/jsp_servlet/_big/_DisplayItemList.java
    Tue Jun 20 10:09:50 CDT 2000:<E> <ServletContext-Servlets>
    weblogic.servlet.JSPServlet: Compilation of /space/weblogic/shop_
    server_com/jspclasses/jsp_servlet/_big/_DisplayItemList.javafailed:
    java.io.IOException: Not enough space
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.forkAndExec(Compiled Code)
    at java.lang.UNIXProcess.<init>(Compiled Code)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.execInternal(Compiled Code)
    at java.lang.Runtime.exec(Compiled Code)
    at java.lang.Runtime.exec(Compiled Code)
    at weblogic.utils.Executable.exec(Compiled Code)
    at weblogic.utils.Executable.exec(Compiled Code)
    atweblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled
    Code)
    at
    weblogic.utils.compiler.CompilerInvoker.compile(Compiled
    Code)
    at weblogic.servlet.JSPServlet.compilePage(Compiled Code)
    at weblogic.servlet.JSPServlet.getStub(Compiled Code)
    at weblogic.servlet.JSPServlet.service(Compiled Code)
    at javax.servlet.http.HttpServlet.service(Compiled Code)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled
    Code)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
    Code)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled
    Code)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled
    Code)
    at weblogic.socket.MuxableSocketHTTP.execute(Compiled
    Code)
    at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
    ************************End of Error Message*****************--
    Srikant, [email protected], http://www.weblogic.com/, etc.

  • Java.io.IOException: Not enough files, skip(42225498) failed

    dear expert,
    During the migration of SAP CRM, on phase - Import Java dump, the following error occurs:
    Apr 21, 2008 12:18:45 PM com.sap.inst.jload.Jload logStackTrace
    SEVERE: java.io.IOException: Not enough files, skip(42225498) failed
            at com.sap.inst.jload.io.SplitInputStream.skip(SplitInputStream.java:368)
            at com.sap.inst.jload.io.SplitInputStream.close(SplitInputStream.java:193)
            at com.sap.inst.jload.io.ChoppedInputStream.close(ChoppedInputStream.java:61)
            at java.io.BufferedInputStream.close(BufferedInputStream.java:398)
            at java.io.FilterInputStream.close(FilterInputStream.java:159)
            at com.sap.inst.jload.io.DataFile.closeDataInputStream(DataFile.java:169)
            at com.sap.inst.jload.db.DBTable.load(DBTable.java:301)
            at com.sap.inst.jload.Jload.dbImport(Jload.java:323)
            at com.sap.inst.jload.Jload.executeJob(Jload.java:397)
            at com.sap.inst.jload.Jload.main(Jload.java:621)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:81)
    Apr 21, 2008 12:18:57 PM com.sap.inst.jload.db.DBConnection disconnect
    i already increase ulimit   nofile to 5000
    all source migration already put on hardisk
    our system using HPUX - oracle
    thanks for your help ...
    rgds
    echo

    hi thanks a lot for help ..
    any way .. can you  guide me how to set permanently ulimit our using HP UX ..
    current ulimit configuration :
    ulimit -a
    time(seconds)        unlimited
    file(blocks)         unlimited
    data(kbytes)         1048576
    stack(kbytes)        131072
    memory(kbytes)       unlimited
    coredump(blocks)     4194303
    nofiles(descriptors) 60000
    thanks a lot
    rgds
    echo
    Edited by: echo haryono on Apr 22, 2008 11:35 AM

  • I cant update my software as it always prompted me ,your start up disk is full and not enough space, when i had done the deleting some of my documents and stuff that i dont need it.

    i cant update my software as it always prompted me ,your start up disk is full and not enough space, when i had done the deleting some of my documents and stuff that i dont need it.

    I use CCleaner from the AppStore to delete the 'useless' stuff. It's free and works great for me

  • Error for 'not enough space' when downloading a video.  I can see that it's music but I'm deleting songs out of my itunes and it's not helping with the space.

    I'm trying to download vide'os to my iPad but I'm getting an error that there is 'not enough space'.  When I look at my space, it's mostly music.  I've deleted out albums from my itunes but it has not freed up any space.  How do I delete these albums?

    Music takes up very little space, movies use a lot of space.
    Settings, music
    Setting, usage
    Both these area will give you info but if the movies are bigger then these areas allow, you may not have enough room even with removing all the music.
    How big are these movies and how many?

  • Transferring lots of small files to a USB - not enough space when there is!

    I regularly transfer about 200-250 files (photos of about 1.2MB each) to a USB (size 2GB). I really want to just "Select All" then drag them onto the USB, but if I do this, I get the error message that there is not enough space. I end up having to select about 40 files at a time and drag each group, wait for them to transfer, then drag the next group. This turns a 2 second job into a 3-5 minute job. On of my iMacs has just started allowing me to do even less - only about 10 at a time, turning this job into a 10-15 minute job. I have discussed this with my USB provider, his only suggestion is I use a Windows computer, as he specifically tests the USBs he sends me for this error, and he does not have a problem with several different Windows computers! I usually import the photos with iPhoto then drag in, but it doesn't seem to matter if I take them straight off the SD card, I get the same error no matter which system I use. Please help! I sometimes need to do this 40 times in a day for 40 different customers.

    I'm taking the photos OFF an SD card (straight from the camera) and need to get them ON to a USB drive. Taking the photos OFF the SD card is no problem. I either import to iPhoto, or drag them all into a file, no problem. It is getting them ON to the USB where there is the problem.
    Thanks, hope this clarifies what I meant!

  • Getting an error message, not enough space, when doing a file backup in HP Recovery Manager

    Hi
    I have a Pavillion dv7-6b32us using Windows 7 64 bit
    Laptop will not boot. (A seperate issue that I have posted on the Laptop Freezes board) and Im trying to backup my drive through HP Recovery Manager. I get a message that there is not enough space available. Is there anyay to backup my drive to save the info?
    This question was solved.
    View Solution.

    Hi,
    Choose yes.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Not enough space when download oracle

    I am the beginner of Linux, and I am try to download Oracle 9i to /usr/oracle directory, but it says I don't have enough space to contain the files. I am confused because I have a partition with size of 8G for the /usr directory. How come I don't have engouh space for the oracle files, which are less than 2G. Anyone could help me?
    Thanks!!!

    Simply do
    #df
    And you will see report about "filesystem disk usage"
    To the right you will see "Mounted On" - that is the column with points which you should create before(with names), there you will find a point where you wont to copy information - "/usr", after check other columns. For example Available .... if there is not enough space better to reinstall system, or use disk druid. Better to do the first.
    Besr regards Anton

  • Macbook 13 retina says "not enough space" when there is.

    My macbook has 236GB free space and I am trying to copy a 180BG file-which I do all the time-from a Thunderbot drive. Today it is telling me ther eis not enough space. I went in to check permissions...the user account I sign in under is not listed and it says "read only". There are three users-System(read & write), everyone(read only)  and a mysterious user named "wheel" (read only) which I deleted. Is the user name I sign in under actually "system"? I could have sworn it actually used to have my user name from the sign in screen...
    Am I even barking up the right tree that permissions could be the issue for the "not enough space" issue? Any help appreciated.
    thanks
    NJ

    From the menu bar, select
     ▹ System Preferences ▹ Time Machine
    If the padlock icon is closed, click it to unlock the settings and authenticate. Turn Time Machine OFF, then back ON and close the preference pane. Try the failed operation again.

  • "Not enough space" DatabaseException while using DatabaseEnvironment

    I want to create some database in a DatabaseEnvironment which will be store a large data, such as 10TB. But I always get an DatabaseException with message "Not enough space",  of course there are enough space to store these data in the driver. It throws a database exception while put data and the database size reach a size(or 125% size) specified by CacheInfo, even though I close and then reopen the database environment and database. In addition,  it will throw an exception when I give the param "gbytes" a value larger than 1 in CacheInfo,  such as  "new CacheInfo(2, 0, 1)". The OS is windows 8. Why?
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.IO;
    using System.Diagnostics;
    using BerkeleyDB;
    namespace TestDatabaseEnvironment
        class Program
            static void Main(string[] args)
                string Dir = @"D:\Temp2\";
                string Name = "TestEnv";
                if (Directory.Exists(Dir))
                    Directory.Delete(Dir, true);
                DatabaseEnvironmentConfig envConfig = new DatabaseEnvironmentConfig();
                envConfig.Create = true;
                envConfig.DataDirs.Add(Dir);
                envConfig.CreationDir = Dir;
                envConfig.MPoolSystemCfg = new MPoolConfig();
                //envConfig.MPoolSystemCfg.CacheSize = new CacheInfo(2, 0, 1);
                envConfig.MPoolSystemCfg.CacheSize = new CacheInfo((uint)0, (uint)64 * 1024 * 1024, 1);
                Console.WriteLine("CacheSize:" +
                    envConfig.MPoolSystemCfg.CacheSize.Gigabytes.ToString() + "GB and " +
                    envConfig.MPoolSystemCfg.CacheSize.Bytes.ToString() + "Bytes");
                envConfig.UseMPool = true;
                envConfig.ErrorPrefix = Name;
                if (!Directory.Exists(Dir))
                    Directory.CreateDirectory(Dir);
                DatabaseEnvironment Env = DatabaseEnvironment.Open(Dir, envConfig);
                HashDatabaseConfig cfg = new HashDatabaseConfig();
                cfg.Env = Env;
                cfg.Creation = CreatePolicy.IF_NEEDED;
                HashDatabase database1 = HashDatabase.Open(null, "db1", cfg);
                HashDatabase database2 = HashDatabase.Open(null, "db2", cfg);
                Stopwatch sw = new Stopwatch();
                sw.Start();
                for (int i = 0; i < 100000000; i++)
                    DatabaseEntry dbKey = new DatabaseEntry(BitConverter.GetBytes(i));
                    DatabaseEntry dbValue = new DatabaseEntry(Encoding.UTF8.GetBytes(new string('A', 10 * 1024) + i.ToString()));
                    database1.Put(dbKey, dbValue);
                    database2.Put(dbKey, dbValue);
                    if (i % 100 == 0)
                        Console.WriteLine(i.ToString() + ":" + sw.Elapsed.TotalSeconds.ToString());
                Console.WriteLine("TimeSpan:" + sw.Elapsed.TotalSeconds.ToString());
                database1.Close();
                database2.Close();
                Env.Close();

    Hi,
    I have run your program on both 32 and 64 bit Windows, but there is no error of "Not enough space". The program is able to inserts the records until it fills up the disk. I have tried running it with CacheInfo(0, 64 * 1024 * 1024, 1) and CacheInfo(1, 64 * 1024 * 1024, 1).
    For the cachesize problem, I can reproduce the failure when the program requests a single 2GB cache. But this is normal.
    32-bit Windows hardly ever has a 2GB contiguous free region in its address map. There are .DLLs and data segments mapped scattered all over the address space, include just below 2GB. Since the most data that a 32-bit application can possibly have is 3 GB (and even that is unusual), there is no single 2GB space for a mapping.
    This is not a BDB bug. If you really need 2GB cache, you could try several smaller regions to get closer to 2GB.
    Moreover, if you pass the null db file name to HashDatabase.Open(). The database will be created in-memory. That means the database stays inside the environment cache only. So if the database grows bigger than the cache, it will return the "Not enough space" error.
    If there is any question, please let me know.
    Regards,
    Cindy Zeng

  • Itunes saying not enough space when ipod empty

    Hi,
    I went to update my ipod mini(4gb) after having to reinstall itunes(annoying) and itunes is saying there is not enough free space to update all files.Even tho my ipod is completley empty itunes thinks there's only about 50% free. Even when i go to my ipod in itunes there is nothing there.it's the bar at the bottom saying ive used 1.75gb with 2.03gb free. Any help would be very appreciated!!!
    Thankyou

    Run the iPod updater and restore it to factory settings.
    Restoring Your iPod

  • Cannot restore backup to iphone because not enough space when i have 4 GB free?

    Everytime I try restoring my iphone from backup it never works properly. This time, I get an error message when trying to restore from backup that says I don't have enough space, but I have 4GB of free space left. Why is this happening?

    Hi ew11131,
    Welcome to the Support Communities!
    The article below may be able to help you with this.
    Click on the link to see more details and screenshots. 
    iOS: "Not enough free space" alert when trying to sync
    http://support.apple.com/kb/ts1503
    iPhone, iPad, and iPod: Understanding capacity
    http://support.apple.com/kb/ht1867
    Cheers,
    - Judy

Maybe you are looking for