PHP / Apache的阻挡对每个请求? [英] PHP/Apache blocking on each request?

查看:112
本文介绍了PHP / Apache的阻挡对每个请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,这可能是一个愚蠢的问题,但在这里不用。我发现了一些其他的一天,当我与不同的HTML玩弄到PDF转换器在PHP。一个我试过(DOMPDF)永远带着对我的HTML运行。它最终跑出的内存和结束,但同时仍在运行,没有我的其他PHP脚本是敏感的。这是几乎一样,如果一个请求被挡住了整个网络服务器。

Ok, this may be a dumb question but here goes. I noticed something the other day when I was playing around with different HTML to PDF converters in PHP. One I tried (dompdf) took forever to run on my HTML. Eventually it ran out of memory and ended but while it was still running, none of my other PHP scripts were responsive at all. It was almost as if that one request was blocking the entire Webserver.

现在我假设要么不可能是正确的,或者我应该在某处设置的东西来控制行为。可有人请给我介绍?

Now I'm assuming either that can't be right or I should be setting something somewhere to control that behaviour. Can someone please clue me in?

推荐答案

做了你每个脚本的公开会议?:)他们可能会重复使用相同的使sesion和阻塞,直到会话由最后一个请求释放.. 。所以他们基本上等待对方来完成(在你的情况下长期运行的PDF生成器)。如果使用相同的浏览器这仅适用。

did you had open sessions for each of the scripts?:) they might reuse the same sesion and that blocks until the session is freed by the last request...so they basically wait for each other to complete(in your case the long-running pdf generator). This only applies if you use the same browser.

提示,不知道为什么你要HTML到PDF,但是你可以看看FOP http://xmlgraphics.apache.org / FOP / 生成PDF的。我使用它,并快速的作品great..and :)它有它的怪癖,但。

Tip, not sure why you want html to pdf, but you may take a look at FOP http://xmlgraphics.apache.org/fop/ to generate PDF's. I'm using it and works great..and fast:) It does have its quirks though.

这篇关于PHP / Apache的阻挡对每个请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆