[gdal-dev] GDALDataset limits?

Patrick Cannon patrick.cannon at barcosoft.com
Fri Aug 1 15:59:32 EDT 2008


Hello Frank and everyone,

Thank you for the replies.

As Daniel and many of you suggested I checked the file handles and it is the 
issue. I had forgotten about that as I was stepping through the software.

We have to have a lot of files open at one time in order to provide 
for "quiltting" of the images.  I was planning to optimize how we load the 
layers and now I have a good reason to move if from "plan" to the "todo" 
list.  I think we can get away with around 100 open files and still cover 
the viewing area.

I apologize for not making my explanation of what was happening clearer.

When I said " If I manually open the files it says can not be found, it 
opens them without issue. " I left out the part about restarting the 
program and not using the "auto" load feature.  When it gave me the file as 
not found, I restarted the program and manually opened the file.  At that 
point I only had 1 dataset open so naturally it worked.

Again, thank you all for your help!


Best regards,
Patrick Cannon
Barco Software LLC

On Friday 01 August 2008 08:56:03 am you wrote:
> Patrick Cannon wrote:
> > Hi Frank,
> >
> > Is there a limit to the number of GDALDatasets that can be open at one
> > time?
> >
> > My program is set to automatically open raster images from a database.
> > There are over 2254 charts in the database.  Each record has the path
> > to the actual file on disk.
> >
> > In auto mode it gets to around 1004 or so files and then GDAL starts
> > returning "file not found" errors.
>
> Patrick,
>
> My first guess would be a file handle limit, as others have mentioned.
>
>  > If I manually open the files it says can not be found, it opens them
>  > without issue.
>
> I'm afraid I don't understand this.  The "says it can not be found"
> and "opens them without issue" parts of this sentance seem to conflict.
>
>  > So the file is available on
> >
> > disk.  Also, if I change the sort on the database so it loads from the
> > bottom it has no problem opening the files in auto mode.
>
> You are saying that you can open at 2254 charts fine if you open them in
> a different order than the default?  That is odd behavior!
>
> At this point I'd normally try running in the debugger to track down
> the failure, and/or running things under something like valgrind.
>
> Best regards,




More information about the gdal-dev mailing list