Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Apr 2012 10:11:35 +0200
From:      Peter Maloney <peter.maloney@brockmann-consult.de>
To:        freebsd-stable@freebsd.org
Subject:   Re: /var getting full
Message-ID:  <4F9E4937.7040000@brockmann-consult.de>
In-Reply-To: <A7E8F1BD002343788083302EC3BFEDC8@CMOTUM25PC>
References:  <4E9B7F6B991C46BF9CCBC03F72A56AFB@CMOTUM25PC><795E082973104798BB84124E63C556CB@CMOTUM25PC><4F9AB906.7000400@my.gd> <CAFHbX1J9T=m85ARUFkJ5FcaDboTOGw8SOn4RXQNLFLunPmfPpw@mail.gmail.com> <A7E8F1BD002343788083302EC3BFEDC8@CMOTUM25PC>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 27.04.2012 17:26, schrieb Efraín Déctor:
> Thank you all.
>
> I found out that a Java process was using all this space. I restarted
> it and voilá problem solved.
Did you write this Java program?

If so, you probably need a finally block:

File f = ...
InputStream in = null;
try {
    in = new FileInputStream(in);
    //whatever you do here, such as create a Reader, you keep a
reference to the InputStream
}finally{
    //A finally is called regardless of what happens in the try. For
example, if there is an Exception thrown, the finally is run anyway.
Code at the end of the try is not called when an exception is thrown.
    if( in != null ) {
        //you must wrap this in a try{}catch(IOException){}, otherwise
the rest of your finally is not run if it throws an Exception
        try{
            in.close();
        }catch(IOException e) {
            logger.log(Level.SEVERE, Failed to close InputStream", e);
        }
    } 
}

>
>
> Thanks.
> -----Mensaje original----- From: Tom Evans
> Sent: Friday, April 27, 2012 10:22 AM
> To: Damien Fleuriot
> Cc: freebsd-stable@freebsd.org
> Subject: Re: /var getting full
>
> On Fri, Apr 27, 2012 at 4:19 PM, Damien Fleuriot <ml@my.gd> wrote:
>> Type:
>> sync
>>
>>
>> Then:
>> df -h
>>
>> Then:
>> cd /var && du -hd 1
>>
>>
>> Post results.
>>
>
> As well as this, any unlinked files that have file handles open by
> running processes will not be accounted for in du, but will be counted
> in df. You could try restarting services that write to /var.
>
> Cheers
>
> Tom
> _______________________________________________
> freebsd-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
> _______________________________________________
> freebsd-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F9E4937.7040000>