来自ajax请求的随机500个内部服务器错误

时间:2022-10-07 15:20:02

I got a random error from my server. It is not happening always so it is not a parameters or wrong URL issues.

我的服务器出现了一个随机错误。它不会总是发生,所以它不是一个参数或错误的URL问题。

The parameters and the URL are the same in each request. No reference in the server logs.

参数和URL在每个请求中都是相同的。服务器日志中没有引用。

On the server side I have few "for" loops and 2 db "selects" so maybe the mySql failed or the server???

在服务器端,我有很少的"for"循环和2 db "选择,所以也许mySql失败或者服务器???

It is a Godaddy hosting.

这是一个Godaddy公司的招待。

Need an advice... I'm attaching few images for example.

需要一个建议……例如,我附加了一些图像。

来自ajax请求的随机500个内部服务器错误

来自ajax请求的随机500个内部服务器错误

EDIT: Sorry guys I would added the ajax.php file but there is no problem with it. Just look that I wrote that It happens in a randomly way. Same parameters, same url, same DB, same functions...

编辑:不好意思,我要添加ajax。php文件,但是没有问题。看,我写的是随机发生的。相同的参数,相同的url,相同的DB,相同的函数…

I'm attaching new image... I wrote Loop in js that is checking every 5 seconds if the ajax is still running, if yes abort it and shoot another one. What happens now is that there are 5-10 ajax until I got an answer from the server (the answer is about 500ms)

我将新形象……我在js中编写了一个循环,如果ajax还在运行,那么每5秒就检查一次,如果是的话,就放弃它,然后再拍另一个。现在的情况是,有5-10个ajax,直到我得到服务器的答案(答案大约是500ms)

Maybe the server is the problem? How can I check it? Thanks!

也许是服务器出了问题?我怎么检查?谢谢!

2 个解决方案

#1


2  

Add

添加

 error_reporting(E_ALL); 
 ini_set('display_errors', 1); 

inside Ajax.php, that will tell the php to output errors rather than just getting an 500 internal server error from the web server

在Ajax。php将告诉php输出错误,而不是从web服务器获取500个内部服务器错误。

That way you get to see what causes the error

这样你就能看到是什么导致了错误

#2


1  

500 indicates an Internal Server Error, i.e., an error that happened server-side.
You should debug ajax.php and see what is causing it to terminate. Looking at your error_log file often helps, too.

500表示一个内部服务器错误,即。,服务器端发生错误。你应该调试ajax。看看是什么导致它终止。查看error_log文件也很有帮助。

#1


2  

Add

添加

 error_reporting(E_ALL); 
 ini_set('display_errors', 1); 

inside Ajax.php, that will tell the php to output errors rather than just getting an 500 internal server error from the web server

在Ajax。php将告诉php输出错误,而不是从web服务器获取500个内部服务器错误。

That way you get to see what causes the error

这样你就能看到是什么导致了错误

#2


1  

500 indicates an Internal Server Error, i.e., an error that happened server-side.
You should debug ajax.php and see what is causing it to terminate. Looking at your error_log file often helps, too.

500表示一个内部服务器错误,即。,服务器端发生错误。你应该调试ajax。看看是什么导致它终止。查看error_log文件也很有帮助。