-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
request failed: socket hang up error #23
Comments
Similar issue here right now. 30% of the time "request failed: socket hang up" when loading a list of SMS messages. Was this issue ever resolved? How? Version: [email protected] |
same issue for me, any idea what is the cause? |
Replaced the MessageBird library by Axios and got rid of the MessageBird library completely. This solved my issue. The REST endpoints are really simple ( https://developers.messagebird.com/api/sms-messaging/#list-messages ). To receive the list of messages e.g.: const axios = require('axios').default;
const MESSAGES_URL = 'https://rest.messagebird.com/messages';
axios.get(MESSAGES_URL, {
params: {
// The status of the message.
// Status scheduled, sent, buffered, delivered, expired, or delivery_failed.
status: '',
// The limit of messages to retrieve.
limit: MAX_NUMBER_OF_MESSAGES,
// The number of messages to skip before selecting.
offset: 0
},
headers: {'Authorization': `AccessKey ${messageBirdAPIKey}`}
})
.then(response => {
processMessages(response.data.items);
})
.catch(function (error) {
logger.error(`Accessing url "${MESSAGES_URL}" to get sms messages failed: `, error);
}); |
This is caused by the 5 seconds timeout that is set in the client. Requests that take longer than 5sec will show this message when timing out, if the default settings are left there. How to set timeout to 10s:
|
so how can we resolved that? |
The last days we get (a lot of) errors while using the client in our production system. Before that everything was working fine.
We're using client version 2.13 and the source of the error is line 93, position 19 in messagebird.js
Anyone else experiencing the same error?
The text was updated successfully, but these errors were encountered: