This is a specific problem with
CFITSIO on Windows. On FreeBSD, Linux and Mac OS X there are no practical file size limits. As an example on the Linux laptop where I'm writing this, I have just written a FITS image with 24000x24000 pixels and three channels in 32-bit floating point format. Then I've closed the image and reloaded the disk FITS file without problems. Note that this image is about 6.5 GB.
CFITSIO is a rather old software library. It has never been designed to be truly portable code in my opinion. I have never liked it for many reasons, but it is the "gold standard" for FITS format support and our FITS support module depends on it since the g'old times of PixInsight LE. The current FITS module uses CFITSIO version 3.35 (June 2013). I'll update it to version 3.37 (June 2014) on September, but I doubt this will fix this problem on Windows.
Ideally, it's time to forget CFITSIO and use something more contemporary. Implementing a FITS support library from scratch is not a realistic option in the short-middle term, so if anyone knows a better FITS support library in C, I am extremely interested in hearing his or her opinions.
Anyway, I'll try to dive into the black waters of CFITSIO code to see if I can hack it to solve this problem. On a parallel note, I strongly recommend using Linux or FreeBSD (and even Mac OS X) for complex and demanding tasks such as building these huge mosaics.