nodeSolidServer / nodeSolidServer/node-solid-server
Error 500 on heavy load.
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 1.8k
- フォーク
- 308
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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> \"\" ."}
...
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
RESTインターフェースから開始し、報告されたPUTおよびPATCHリクエストを使用して、約160万個のトリプルを処理するnode-fetchのワークロードを再現します。サーバーが約80,000件のレコードの後にHTTP 500レスポンスを返し始める理由と、回復するかどうかを調査します。ワークロードで永続的な500エラーが発生しなくなり、その障害が適切なテストまたは再現によってカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, node.js
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100