Operating System - Linux
1752782 Members
6201 Online
108789 Solutions
New Discussion юеВ

File size limit exceeded (Java)

 
Steven McCoy
Valued Contributor

File size limit exceeded (Java)

Good morning/afternoon everyone,

Last night there were some Java application crashes here due to a "File size limit exceeded" on a log file that had reached 2GB. Of course, once the log file was moved out of the way, applications started and ran as normal.

My first thought was that it was a Java compile-time or parameter restriction as these are 64-bit systems running 2.6 kernels (and recent versions of glibc), but I just wanted to be sure I've covered all my bases:

aspt5ap1 ~ $ uname -a
Linux aspt5ap1.domain.snipped 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

aspt5ap1 ~ $ free -m
total used free shared buffers cached
Mem: 7985 6726 1258 0 115 5909
-/+ buffers/cache: 702 7283
Swap: 7999 0 7999

aspt5ap1 ~ $ rpm -q glibc
glibc-2.5-34
glibc-2.5-34
aspt5ap1 ~ $

2 REPLIES 2
Steven McCoy
Valued Contributor

Re: File size limit exceeded (Java)

The developers just got back to me, it's actually a C++ app that was not compiled with the below flag. I have asked them to recompile with this flag:

g++ -D_FILE_OFFSET_BITS=64

If anyone has any suggestions or alternatives, that'd be great. Thanks!
Steven McCoy
Valued Contributor

Re: File size limit exceeded (Java)

After recompiling their applications with the above flag and testing with last night's 2GB log file, everything works great, now.

Hopefully this thread helps someone else in the future.