Application Pool stucked while other exe is running

alex_f

New Member
I run a website with IIS 7.5 in classic ASP with an isolated Application Pool (ApplicationPoolIdentity). Inside this website I also run unmanaged code (wkhtmltopdf.exe) thru "WScript.Shell" object run method. After that I stream the result file as pdf \[code\] set wshell = CreateObject("WScript.Shell") wshell.run pathtoexe & " " & link & " """ & pathtofile & """", 0, TRUE set wshell = nothing Response.Clear Response.ContentType = "application/pdf" Response.AddHeader "Content-Disposition", "inline; filename=" + filename Const adTypeBinary = 1 Set objStream = Server.CreateObject("ADODB.stream") objStream.Open objStream.Type = adTypeBinary objStream.LoadFromFile pathtofile Response.BinaryWrite objStream.Read objStream.Close Set objStream = Nothing \[/code\]Everything works fine but sometimes my Website Hang. It's completely stuck. I can see what causes that. It's the wktmltopdf.exe running under the identity of the app pool (iis apppool\myapp) that is stuck. This causes my all website to hang it doesn't answer to any request anymore. But the AppPool do not crash or fail. So basically my website hang until I manually stop the process whtmltopdf.exe. Once I've done that everything go back to normal. What I want to ask is what do you think I should do ?Do you have any idea what could cause wkhtmltopdf to crash ?Why is my application pool stucked as long as wkhtmltopdf is stucked and why it goes back to normal when I kill it ?Should I create another application to monitor this whtmltopdf.exe and kill it if it hangs ?
 
Back
Top