You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Chris Braddock <sm...@hotmail.com> on 2003/08/06 22:28:43 UTC

help - multiple concurrent xalan processes hang!

Howdy.

I'm wondering if there is a known issue with running multiple instances of 
xalan.exe?

I'm working on a application that relies on xalan-c to perform a 
transformation for each web request to transform some XHTML and some XML and 
return the resulting HTML to the browser.

Been using this for a while in development now -- everything seemed to be 
working ok.

I recently started work on a frames-based page that makes 4 requests at once 
(4 frames) and I started to notice the xalan.exe processes "locking up".

Here's where things get a little weird.  I have to "step back" in my 
explanation a bit.  Each XHTML file contains a DOCTYPE declaration using the 
w3c.org URL for the xhtml DTD, like so:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

In order to save Xalan from running out to the w3c for each request, I put 
an entry for w3c.org pointing to localhost in my hosts file and use a DTD 
located on my local webserver.

Now I could have just changed the URL in the DOCTYPE declaration to 
http://localhost/xhtml1-transitional.dtd, BUT... this causes DreamWeaver to 
"freak out" and not render the pages properly in it's preview pane which is 
why we decided against doing this.  We likely won't want to put this hosts 
entry on our production webservers, so some other method will be needed for 
prod.

Ok, so using the hosts-file/localhost DTD method is when Xalan processes 
seem to lock up (when multiple xalan processes are running at the same 
time).  If I'm only processing 1 request at a time, things still run 
smoothly.

If I remove the hosts entry and allow Xalan to go out to w3c for it's DTD, 
it works fine.

That's a lot of explanation for 1 email, so I'll see if anyone bites on 
that.  I'll be happy to provide more inforation should anyone want.

Thanks a ton - this has been a 2-day+ bug hunt so far....

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


Re: help - multiple concurrent xalan processes hang!

Posted by da...@us.ibm.com.



Hi Chris,

Anything to do with retrieving and parsing documents is something that
would be done by Xerces, so I suggest you try to reproduce this with a
simple program that just has Xerces parse the files.

However, if it works fine when Xerces is reading the DTD from the w3 web
server, but not fine when it's reading it from yours, I would suspect it's
something to do with your web server and how the redirection is
implemented.

You mention in your development environment that you only have two agents
to process things.  Is it possible the redirect of the DTD needs an agent
available to serve the DTD, so you've got a deadlock in your web server?

By the wa, I can't imagine spawning the Xalan executable to do a
transformation will be very efficient or scalable.  Is this really how
you're planning on doing things in a production environment?

Dave



                                                                                                                                  
                      "Chris Braddock"                                                                                            
                      <smapdi636@hotma         To:      xalan-c-users@xml.apache.org                                              
                      il.com>                  cc:      rmirro@microserve.net, (bcc: David N Bertoni/Cambridge/IBM)               
                                               Subject: help - multiple concurrent xalan processes hang!                          
                      08/06/2003 01:28                                                                                            
                      PM                                                                                                          
                                                                                                                                  



Howdy.

I'm wondering if there is a known issue with running multiple instances of
xalan.exe?

I'm working on a application that relies on xalan-c to perform a
transformation for each web request to transform some XHTML and some XML
and
return the resulting HTML to the browser.

Been using this for a while in development now -- everything seemed to be
working ok.

I recently started work on a frames-based page that makes 4 requests at
once
(4 frames) and I started to notice the xalan.exe processes "locking up".

Here's where things get a little weird.  I have to "step back" in my
explanation a bit.  Each XHTML file contains a DOCTYPE declaration using
the
w3c.org URL for the xhtml DTD, like so:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

In order to save Xalan from running out to the w3c for each request, I put
an entry for w3c.org pointing to localhost in my hosts file and use a DTD
located on my local webserver.

Now I could have just changed the URL in the DOCTYPE declaration to
http://localhost/xhtml1-transitional.dtd, BUT... this causes DreamWeaver to

"freak out" and not render the pages properly in it's preview pane which is

why we decided against doing this.  We likely won't want to put this hosts
entry on our production webservers, so some other method will be needed for

prod.

Ok, so using the hosts-file/localhost DTD method is when Xalan processes
seem to lock up (when multiple xalan processes are running at the same
time).  If I'm only processing 1 request at a time, things still run
smoothly.

If I remove the hosts entry and allow Xalan to go out to w3c for it's DTD,
it works fine.

That's a lot of explanation for 1 email, so I'll see if anyone bites on
that.  I'll be happy to provide more inforation should anyone want.

Thanks a ton - this has been a 2-day+ bug hunt so far....

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail