You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2002/02/06 17:32:05 UTC

DO NOT REPLY [Bug 4556] - Xerces fails to locate DTD file when application has been running for awhile

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4556>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4556

Xerces fails to locate DTD file when application has been running for awhile

giulio.graziani@bridgewatersystems.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |



------- Additional Comments From giulio.graziani@bridgewatersystems.com  2002-02-06 16:32 -------
We are still experiencing problems with the Xerces library (now using version 
1.6.0 on SunOS 5.8) and it running out of file descriptors. Here's an update on 
the situation:

I can now reproduce the problem immediately in our software (and not after a 
few weeks of having the server running). It is not a file descriptor leak in 
our code as was previously suggested. I've done some investigation on the 
Solaris OS between fopen() and open(). We use open() to open the XML file which 
includes the line:
<!DOCTYPE VendorConfiguration SYSTEM "./vendors.dtd"> 
The Xerces library then opens the DTD file using fopen().

With open(), you can dynamically set the upper limit on the number of file 
descriptors that a process can open by doing the following at the command 
prompt: 
> limit descriptors nnn 
where nnn is some value (by default the upper limit is 256 on SunOS 5.8 and 64 
on SunOS 5.7)
However, with fopen(), there seems to be two OS constraints that govern the 
number of files/streams that can be opened by a process. The first is this 
upper limit as described above and ****the second is an OS imposed 
unconfigurable maximum (ie. OPEN_MAX = 256 on SunOS5.8, 64 on 5.7). Both of 
these conditions must be satisfied in order for fopen() to succeed.**** I have 
run test programs using open() and fopen() to determine this as the man pages 
are not quite clear about this.

Instructing the OS to use "limit descriptors 512" and then configuring our 
application to run using more than 256 FDs we were able to successfully load 
the DTDs since the DTDs are loaded before the 256 FDs are created. After the 
application has completed loading, a HUP signal is sent to it and because the 
OPEN_MAX limit has been reached, the Xerces library fails to open the DTDs (on 
fopen()).

The workaround is to embed the DTD straight into the XML file so that Xerces 
does not load it using fopen(), it's all taken care of by open(). Is it 
possible to change the opening of DTDs to open() instead of fopen() in order to 
get around this OS imposed contraint?

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org