问题描述:classic开发,前端ajax 发post请求,sql查询数据集中所有点数据,当数据量较大时服务端500报错,数据量较小时没有问题,可以获取到返回数据,请问有什么解决办法?谢谢!
问题图片:
失败:
成功:
实现代码:
$.ajax({
type: "post",
url: "http://192.168.12.111:8090/iserver/services/data-DuoGuangPu/rest/data/featureResults.json?returnContent=true&fromIndex=0&toIndex=-1",
data: JSON.stringify({'hasGeometry':false,'datasetNames':["data:栅格重采样点数据"],'getFeatureMode':"SQL",'queryParameter':{'fields':["SMX","SMY","VALUE"],'attributeFilter':"SmID > -1",'name':null,'joinItems':null,'linkItems':null,'ids':null,'orderBy':null,'groupBy':null}}),
//data: JSON.stringify({'hasGeometry':false,'datasetNames':["data:栅格点数据"],'getFeatureMode':"SQL",'queryParameter':{'fields':["SMX","SMY","VALUE"],'attributeFilter':"SmID > -1",'name':null,'joinItems':null,'linkItems':null,'ids':null,'orderBy':null,'groupBy':null}}),
dataType: "json",
async: true, //异步执行
success: function(data){
console.log(data);
},
error :function(e){
console.log(e);
}
})