Home  >  Article  >  Backend Development  >  小弟我写了一个程序,但是访问一会,就会把apache卡死,只有重起才会好

小弟我写了一个程序,但是访问一会,就会把apache卡死,只有重起才会好

WBOY
WBOYOriginal
2016-06-13 10:34:34775browse

我写了一个程序,但是访问一会,就会把apache卡死,只有重起才会好。
我想问问,这个是什么原因引起的哟?
我怎么调试呢,找出问题呢?

------解决方案--------------------
至少需要这样:
设一全局变量 ok 令
ok = 1;
.....
if( s ok = 0;
$.getJSON(getDataUrl,{start:start,end:end,id:typeId},function(e){
scrollData = e;
...
scrollData='';
ok = 1;
}

其意义在于:当ajax数据没有返回时,不进行下一轮请求

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn