开发者

What happens if I kill a process in a PHP script with cPanel?

I use cPanel and I'm up power CPU. My PHP script (messenger.php) uses too much CPU power, so I want to kill it with Process Management.

I looked at the documentation of cPanel here: http://docs.cpan开发者_StackOverflowel.net/twiki/bin/view/AllDocumentation/WHMDocs/CurrentCPUUsage

When I kill this process, what's there for my users who use this page (messenger.php) and when will it re-run again?


When you kill it, everything will be aborted - database queries, deletions, inserts, submits, ...

So someone could lost some important data in the worst case


If you kill a php process it will shut down ungracefully and not finish any outstanding work it has to do. This usually results in a error 500 for users who requested the page but did not receive it yet. However the process will usually restart automatically, new page requests should be served in a matter of miliseconds again. The other running php processes will take over the workload of the process you terminated while it restarts, except of course the other processes are hanging too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜