前端提交数据接口为:/prod-api/saveRainRcd?cityname=bh&begintime=20240201&endtime=20240202&savestr={[{"cityname":"bh","staName":"北海站","staNo":"50001", "date":"20240201", "20-20rain":"20.78"},{"cityname":"bh", "staName":"合浦站", "staNo":"50002", "date":"20240201", "20-20rain":"12.20"},{"cityname":"bh","staName":"北海站","staNo":"50001", "date":"20240202", "20-20rain":"6.06"},{"cityname":"bh", "staName":"合浦站", "staNo":"50002", "date":"20240202", "20-20rain":"20.88"}]}
同一配置,在window服务器设置nginx请求头增加到1m最大到5m 解决了报错414问题。但在虚拟机linux同样配置情况下,接口拼接参数数据中savestr为查询到的数据修改全部提交。如转化为数组超过15条数据,点击修改按钮提交就会马上报错Net error,
其中nginx.conf配置如下
worker_processes 1;events { worker_connections 1024;}http {include mime.types;default_type application/octet-stream;sendfile on;keepalive_timeout 65;client_max_body_size 100m;client_header_buffer_size 1024k;# 请求行+请求头的标准大小为1mlarge_client_header_buffers 5 1024k; # 请求行+请求头的最大大小为5mserver { listen 8111; server_name localhost; charset utf-8; location / { root \\html\\dist; try_files $uri $uri/ /index.html; index index.html index.htm; } location /prod-api/{ proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://127.0.0.1:6688/; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; }}
}
在虚拟机linux系统配置情况一样下,若savestr中的数据在8条或12条 接口提交参数为浏览器Network(网络)标头为:
接口参数拼接情况为:/prod-api/cityname=yl&begintime=20220607&endtime=20220609&savestr={[{"cityname":"yl","staName":"北流","staNo":"59001","date":"20220608","20-20rain":"28.2"},{"cityname":"yl","staName":"博白","staNo":"59002","date":"20220608","20-20rain":"32.9"},{"cityname":"yl","staName":"容县","staNo":"59003","date":"20220608","20-20rain":"9.1"},{"cityname":"yl","staName":"陆川","staNo":"59004","date":"20220608","20-20rain":"126.7"},{"cityname":"yl","staName":"北流","staNo":"59001","date":"20220609","20-20rain":"44.1"},{"cityname":"yl","staName":"博白","staNo":"59002","date":"20220609","20-20rain":"3.2"},{"cityname":"yl","staName":"容县","staNo":"59003","date":"20220609","20-20rain":"0.5"},{"cityname":"yl","staName":"陆川","staNo":"59004","date":"20220609","20-20rain":"17.7"}]}
超过15条数据标头为:
接口参数拼接情况为:cityname=wz&begintime=20220218&endtime=20220221&savestr= {[{"cityname":"wz","staName":"梧州","staNo":"59001","date":"20220219","20-20rain":"52.3"},{"cityname":"wz","staName":"藤县","staNo":"59002","date":"20220219","20-20rain":"61.9"},{"cityname":"wz","staName":"蒙山","staNo":"59003","date":"20220219","20-20rain":"41.5"},{"cityname":"wz","staName":"龙圩","staNo":"59004","date":"20220219","20-20rain":"46.6"},{"cityname":"wz","staName":"岑溪","staNo":"59005","date":"20220219","20-20rain":"85.3"},{"cityname":"wz","staName":"梧州","staNo":"59001","date":"20220220","20-20rain":"48"},{"cityname":"wz","staName":"藤县","staNo":"59002","date":"20220220","20-20rain":"53.2"},{"cityname":"wz","staName":"蒙山","staNo":"59003","date":"20220220","20-20rain":"36.5"},{"cityname":"wz","staName":"龙圩","staNo":"59004","date":"20220220","20-20rain":"45.4"},{"cityname":"wz","staName":"岑溪","staNo":"59005","date":"20220220","20-20rain":"46.3"},{"cityname":"wz","staName":"梧州","staNo":"59001","date":"20220221","20-20rain":"22.2"},{"cityname":"梧州","staName":"藤县","staNo":"59002","date":"20220221","20-20rain":"23.7"},{"cityname":"wz","staName":"蒙山","staNo":"59003","date":"20220221","20-20rain":"9.3"},{"cityname":"wz","staName":"龙圩","staNo":"59004","date":"20220221","20-20rain":"23.4"},{"cityname":"wz","staName":"岑溪","staNo":"59005","date":"20220221","20-20rain":"22.3"}]}
此时提交会马上显示接口 并且浏览器-网络 预览 显示Failed load response data:No data found for resource with given identifier。
1.尝试过在nginx.conf 下的 location / 添加 location /prod-api/ 下的最后一行添加 添加情况如下:
location / { root \\html\\dist; try_files $uri $uri/ /index.html; index index.html index.htm; fastcgi_buffers 256 1024k; chunked_transfer_encoding off; } location /prod-api/{ proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://127.0.0.1:6688/; fastcgi_buffers 256 1024k; chunked_transfer_encoding off; }
重启nginx,进入修改数据调用接口提交,在数据量savestr大(里面的数组长度超过15条)的情况下还是马上报错 savestr数据量小(小于15条)情况下修改提交正常。
此问题仅在虚拟机linux部署中出现。如何进行调整呢?
建议你不要把参数放在url里,这么长的建议你使用post放在body里会比较好
在数据库原理中,关系运算包含 选择、投影、连接 这三种运算。相应的在SQL语句中也有表现,其中Where子句作为选择运算,Select子句作为投影运算,From子句作为连接运算。 连接运算是从两个关系的笛卡尔积中选择属性间满足一定条件的元组,在连接中最常用的是等值连接和自然连接。 等值连接:关系R、S,取两者笛卡尔积中属性值相等的元组,不要求属性相同。比如 R.A=S.B 自然连接(内连接):是一
使用方式:import core "github.com/lengzhao/govm/app/chain1/ae4a05b2b8a4de21d9e6f26e9d7992f7f33e89689f3015f3fc8a3a3278815e28c" 接口中所有的user都需要使用合约的私有结构体作为参数。如第二章中的样例Event接口 接口的具体实现可以查看源码:govm/app/chain1/ae4a0
本文向大家介绍python在linux系统下获取系统内存使用情况的方法,包括了python在linux系统下获取系统内存使用情况的方法的使用技巧和注意事项,需要的朋友参考一下 本文实例讲述了python在linux系统下获取系统内存使用情况的方法。分享给大家供大家参考。具体如下: 将上面的代码保存为:memorymonitor.py 调用方法如下: 希望本文所述对大家的Python程序设计有所帮助
系统调用 我们要想启动一个进程,需要操作系统的调用(system call)。实际上操作系统和普通进程是运行在不同空间上的,操作系统进程运行在内核态(todo: kernel space),开发者运行的进程运行在用户态(todo: user space),这样有效规避了用户程序破坏系统的可能。 如果用户态进程想执行内核态的操作,只能通过系统调用了。Linux提供了超多系统调用函数,我们关注与进程相
系统级的 API 接口,不需要用户及应用参数,可获取 百度移动统计 站点范围的移动数据信息,具体接口如下: 功能 接口路径 参数 获取设备机型列表 config/getDeviceList 无 获取操作系统列表 config/getOsList 无 获取屏幕分辨率列表 config/getScreenList 无 获取联网方式列表 config/getNetworkList 无
一个有用的Scheme程序经常需要与底层操作系统进行交互。 11.1 检查和删除文件 file-exists?会检查它的参数字符串是否是一个文件。delete-file接受一个文件名字符串作为参数并删除相应的文件。这些程序并不是Scheme标准的一部分,但是在大多数Scheme实现中都能找到它们。用这些过程操作目录(而不是文件)并不是很可靠。(用它们操作目录的结果与具体的Scheme实现有关。)