You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 29, 2024. It is now read-only.
I'm hammering this with ab, piwik works on a small machine. Sometimes mysql goes offline, and piwik goes too. So no response returns without error and it crashes like this
/Users/xxxxx/Documents/workspace/xxxxx/node_modules/piwik/piwik.js:162
data = res.body;
^
TypeError: Cannot read property 'body' of undefined
I added a control to if there is a res or not.
if (res) {
try {
data = JSON.parse (res.body);
if (data.result && data.result === 'error') {
error = new Error ('api error');
error.text = data.message || null;
}
}
catch (e) {
data = res.body;
}
if (res.statusCode >= 300) {
error = new Error ('http error');
error.code = res.statusCode;
error.body = data;
}
}
I'm hammering this with ab, piwik works on a small machine. Sometimes mysql goes offline, and piwik goes too. So no response returns without error and it crashes like this
/Users/xxxxx/Documents/workspace/xxxxx/node_modules/piwik/piwik.js:162
data = res.body;
^
TypeError: Cannot read property 'body' of undefined
I added a control to if there is a res or not.
so it stopped crashing.