Welcome Guest Search | Active Topics | Sign In | Register

PDF Conversion IIS worker process hangs Options
Harry50
Posted: Thursday, July 21, 2011 7:56:11 AM
Rank: Member
Groups: Member

Joined: 7/21/2011
Posts: 12
Hi,

we are currently evaluating the EO.Pdf Component.
Looks pretty good!
But from time to time when calling ASPXToPdf.RenderAsPdf()
nothing happens for a while and finally the worker process hangs.
After killing the process it works again.

Best regards,
Harry
eo_support
Posted: Thursday, July 21, 2011 8:14:03 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Please try to set HtmlToPdf.Options.MaxLoadWaitTime and see if it helps. By default, the converter will try to wait for everything in the page to be loaded so that it can get a rendering result as accurate as possible. However in case some files (for example, an image) is not loading correctly, it can wait for a long time. MaxLoadWaitTime controls the amount of time it tries to wait before reporting a time out.

When the page is waiting for the converter to return, your server would appear to be hanging. But it is actually not. The reason that it appears to be hanging is because ASP.NET put a lock on a single session so that your session can not have two concurrent request (otherwise you would need to use locks when you access session variables). Because the first request is still in progress, ASP.NET will not process the second request from you. However it will process new requests from other sessions. To verify this, you can go to another computer to access your server when you server appears to be hanging. Your server should respond fine.

Also, even if you do not do anything, eventually the converter will time out. When that happens your session will come back to life again. So there is no need to kill IIS for this case.

Thanks
Harry50
Posted: Thursday, July 21, 2011 9:40:10 AM
Rank: Member
Groups: Member

Joined: 7/21/2011
Posts: 12
Hi,

thanks for the quick answer.
The timeout is not the problem.
It seems that your component starts a rundll32.exe process.
This process seems to hang from time to time and when it hangs it
is continuously consuming memory (I killed it at 360MB!).
As long as this rundll32 process runs the worker process hangs also.
Other web applications that run on this worker process also doesn't work
anymore.

Any ideas?!?!?

Thanks,
Harry
eo_support
Posted: Thursday, July 21, 2011 9:59:29 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Rundll32.exe is the one that actually loads the HTML page and performs the conversion. We do it in a separate process for a number of reasons, one of the most important reasons is to isolate the conversion from your hosting process (in your case the IIS process) so that in case the converter takes a long time the hosting process would be able to detect it and kill it. The most obvious reason for Rundll32.exe to continuously consume memory is because it is loading a huge HTML file (or file with a lot of images). This can occur if you page is indeed very large; or you have some JavaScript code that keeps loading new things. If that is the case, then you just have to modify the page size or wait it out. In any case, if you can reproduce the problem consistently or provide a test environment for us to reproduce and see the problem, we will be happy to investigate further to see if we can find the exact reason.

As we have already explained in the previous reply, your IIS will not (or should not) hang in this case. It should continue to serve other sessions. Note you must go to another computer to test this. If you just try to test it from the same computer you will see the server blocking you and this is completely normal when the server is in the process of severing another page to you.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.