nodeSolidServer / nodeSolidServer/node-solid-server
Error 500 on heavy load.
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 1.8k
- Fork
- 308
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I have experienced a strange behaviour over the REST interface using node-fetch module.
While this is not the most efficient way of doing things, it has thrown up the following error 500.
I read in around 11 ttl files so that total about 1,6m triples. I now want to pivot them and create a file per subject. I process each of the 1,6m triples as set out below. Check whether the resource exists. If it does not, create it using PUT, else PATCH in the new triple.
For logging I write out a 'pulse' every 5,000 records.
The code below is an extract of the process.
let getResult = await fetch(newUrl, {method: "HEAD"})
// console.log(getResult.status)
if (getResult.status === 404) {
options = {
method: "PUT",
headers: {
"content-type" : "text/turtle",
"Link": "<http://www.w3.org/ns/ldp#Resource>; rel='type'"
},
body: `${newSubject} <${newPredicate}> ${newObject} .`
}
}
else {
options = {
method: "PATCH",
headers: {
"content-type" : "application/sparql-update",
"Link": "<http://www.w3.org/ns/ldp#Resource>; rel='type'"
},
body: `INSERT DATA { ${newSubject} <${newPredicate}> ${newObject} }`
}
};
let res1 = await fetch(newUrl, options);
if ((res1.status != 200) && (res1.status != 201)) console.log("PROBLEMS WITH THE SOLID-SERVER", res1.status, JSON.stringify(options));
if ( i % 5000 === 0) console.log("output", i, newUrl, res1.status);
Just after the 80,000th log entry and before the 85,000th log entry, the server starts producing error 500 and never recovers. As can be seen in the output below:
...
output 75000 https://127.0.0.1:8443/eim/App_Inst/714101 200
output 80000 https://127.0.0.1:8443/eim/App_Inst/876505 200
PROBLEMS WITH THE SOLID-SERVER 500 {"method":"PUT","headers":{"content-type":"text/turtle","Link":"<http://www.w3.org/ns/ldp#Resource>; rel='type'"},"body":"<> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://127.0.0.1:8443/eim/App_Instance_Review> ."}
PROBLEMS WITH THE SOLID-SERVER 500 {"method":"PUT","headers":{"content-type":"text/turtle","Link":"<http://www.w3.org/ns/ldp#Resource>; rel='type'"},"body":"<> <https://127.0.0.1:8443/eim/App_Inst_ID> \"\" ."}
...
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu từ giao diện REST và tái hiện workload của node-fetch xử lý khoảng 1,6 triệu bộ ba, bằng các yêu cầu PUT và PATCH đã được báo cáo. Điều tra lý do máy chủ bắt đầu trả về các phản hồi HTTP 500 sau khoảng 80.000 bản ghi và liệu nó có phục hồi hay không; được xem là hoàn tất khi workload không còn tạo ra các lỗi 500 dai dẳng và lỗi này được bao phủ bởi một test hoặc bản tái hiện phù hợp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, node.js
- Lĩnh vực
- backend
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100