Ok, this might be a dumb question but here goes. I observed something yesterday after i was experimenting with various HTML to PDF converters in PHP. One I attempted (dompdf) required forever to operate on my small HTML. Eventually it went from memory and ended but although it was still being running, none of my other PHP scripts were responsive whatsoever. It had been nearly as if that certain request was obstructing the whole Webserver.
Now I am presuming either that can not be right or I ought to be setting something somewhere to manage that behavior. Can someone please clue me in?
have you had open periods for each one of the scripts?:) they may reuse exactly the same sesion which blocks before the session is freed through the last request...so that they essentially watch for one another to accomplish(inside your situation the lengthy-running pdf generator). This only is applicable if you are using exactly the same browser.
Tip, unsure the reason why you want html to pdf, however, you may have a look at FOP http://xmlgraphics.apache.org/fop/ to create PDF's. I am utilizing it and is effective..and fast:) It will have its eccentricities though.
Maybe all of the scripts you attempted are running within the same application pool. (A minimum of, that is what it's contacted IIS.)
However, another explanation is the fact that some browsers will queue demands on the single connection. It has triggered me some confusion previously. In case your internet browser delays for any response from yourdomain.com/script1.php and also you open another window or tab to yourdomain.com/script2.php that request will not be sent before the first request gets to be a reply which makes it appear much like your entire web server is hanging. A good way to check if this sounds like what's happening try two demands on two separate browsers.
It may sound such as the server is just being overcome and under an excessive amount of load to accomplish the demands. Transforming an HTML file to some PDF is a nice complex process, because the PHP script needs to effectively supply the same functionality like a internet browser and render the HTML using PDF drawing functions.
I recommend you can either split the HTML into separate, more compact files or run the script like a scheduled task directly through PHP in addition to the server.