Yield call timeout after 60 seconds when calling api in React Redux-SagaReact, Redux and Axios - trying to make API callRedux Saga - yield call not returning dataBest way to integrate React, Redux, Redux-Form, and React-Saga?Best practice architecture for encapsulating a shared API object with redux/sagas?React Native redux saga yield not working on first actionHow to pause and restart API calls in react-redux app while access token is being refreshed?Handle Sync in react redux sagaWait for redux action to finish dispatching when using redux sagaWhat do redux-saga API calls return? (take, for example)How to set timeout for yield call in React Redux-Saga
Does tea made with boiling water cool faster than tea made with boiled (but still hot) water?
555 timer FM transmitter
What is the most expensive material in the world that could be used to create Pun-Pun's lute?
I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?
"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?
Minor Revision with suggestion of an alternative proof by reviewer
Aliens crash on Earth and go into stasis to wait for technology to fix their ship
How much cash can I safely carry into the USA and avoid civil forfeiture?
Pre-plastic human skin alternative
Should the Death Curse affect an undead PC in the Tomb of Annihilation adventure?
Is the claim "Employers won't employ people with no 'social media presence'" realistic?
How to pronounce 'c++' in Spanish
"You've called the wrong number" or "You called the wrong number"
Why was the Spitfire's elliptical wing almost uncopied by other aircraft of World War 2?
Why does Mind Blank stop the Feeblemind spell?
Was there a shared-world project before "Thieves World"?
Apply MapThread to all but one variable
What happens to Mjolnir (Thor's hammer) at the end of Endgame?
Get consecutive integer number ranges from list of int
Mistake in years of experience in resume?
How can Republicans who favour free markets, consistently express anger when they don't like the outcome of that choice?
Why did C use the -> operator instead of reusing the . operator?
Is there really no use for MD5 anymore?
Map of water taps to fill bottles
Yield call timeout after 60 seconds when calling api in React Redux-Saga
React, Redux and Axios - trying to make API callRedux Saga - yield call not returning dataBest way to integrate React, Redux, Redux-Form, and React-Saga?Best practice architecture for encapsulating a shared API object with redux/sagas?React Native redux saga yield not working on first actionHow to pause and restart API calls in react-redux app while access token is being refreshed?Handle Sync in react redux sagaWait for redux action to finish dispatching when using redux sagaWhat do redux-saga API calls return? (take, for example)How to set timeout for yield call in React Redux-Saga
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
In my rest API backend(django), I do heavy processing and usually, it takes 1.5 minutes to produce a result, in that time I'm getting this error in my frontend react application.
export function* create(action)
try
const payload = action;
const response = yield call(api.addPost, payload); **//can i set timout for this api call, here timeout after 60 second **
if (response.status === 200)
console.log('pass 200 check');
yield put(appActions.setResourceResponse(response.data));
console.log(response.data);
payload.push('/add-news');
catch (error)
console.log(error);
yield put(
a.setResponse(
message: error.response.data,
status: error.response.status,
),
);
Error: timeout of 60000ms exceeded
So, peer connection is lost.
How do I set request timeout in redux-saga
reactjs django-rest-framework react-redux redux-saga
add a comment |
In my rest API backend(django), I do heavy processing and usually, it takes 1.5 minutes to produce a result, in that time I'm getting this error in my frontend react application.
export function* create(action)
try
const payload = action;
const response = yield call(api.addPost, payload); **//can i set timout for this api call, here timeout after 60 second **
if (response.status === 200)
console.log('pass 200 check');
yield put(appActions.setResourceResponse(response.data));
console.log(response.data);
payload.push('/add-news');
catch (error)
console.log(error);
yield put(
a.setResponse(
message: error.response.data,
status: error.response.status,
),
);
Error: timeout of 60000ms exceeded
So, peer connection is lost.
How do I set request timeout in redux-saga
reactjs django-rest-framework react-redux redux-saga
what are you using to make the api call? something like fetch or axios?
– Tetsuya3850
Mar 9 at 9:36
add a comment |
In my rest API backend(django), I do heavy processing and usually, it takes 1.5 minutes to produce a result, in that time I'm getting this error in my frontend react application.
export function* create(action)
try
const payload = action;
const response = yield call(api.addPost, payload); **//can i set timout for this api call, here timeout after 60 second **
if (response.status === 200)
console.log('pass 200 check');
yield put(appActions.setResourceResponse(response.data));
console.log(response.data);
payload.push('/add-news');
catch (error)
console.log(error);
yield put(
a.setResponse(
message: error.response.data,
status: error.response.status,
),
);
Error: timeout of 60000ms exceeded
So, peer connection is lost.
How do I set request timeout in redux-saga
reactjs django-rest-framework react-redux redux-saga
In my rest API backend(django), I do heavy processing and usually, it takes 1.5 minutes to produce a result, in that time I'm getting this error in my frontend react application.
export function* create(action)
try
const payload = action;
const response = yield call(api.addPost, payload); **//can i set timout for this api call, here timeout after 60 second **
if (response.status === 200)
console.log('pass 200 check');
yield put(appActions.setResourceResponse(response.data));
console.log(response.data);
payload.push('/add-news');
catch (error)
console.log(error);
yield put(
a.setResponse(
message: error.response.data,
status: error.response.status,
),
);
Error: timeout of 60000ms exceeded
So, peer connection is lost.
How do I set request timeout in redux-saga
reactjs django-rest-framework react-redux redux-saga
reactjs django-rest-framework react-redux redux-saga
asked Mar 9 at 9:21
Talha MalikTalha Malik
11
11
what are you using to make the api call? something like fetch or axios?
– Tetsuya3850
Mar 9 at 9:36
add a comment |
what are you using to make the api call? something like fetch or axios?
– Tetsuya3850
Mar 9 at 9:36
what are you using to make the api call? something like fetch or axios?
– Tetsuya3850
Mar 9 at 9:36
what are you using to make the api call? something like fetch or axios?
– Tetsuya3850
Mar 9 at 9:36
add a comment |
1 Answer
1
active
oldest
votes
If you are using axios, you could change the timeout setting like this.
axios(
method: 'post',
url: 'http://127.0.0.1:9000',
timeout: 60 * 2 * 1000, // Let's say you want to wait at least 2 mins
data:
id: '1234',
)
i have set axios.defaults.timeout = 1000. it worked. Thanks for your help
– Talha Malik
Mar 9 at 12:32
Great to hear! If all is well please approve the answer! (stackoverflow.com/help/someone-answers)
– Tetsuya3850
Mar 9 at 23:06
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55075819%2fyield-call-timeout-after-60-seconds-when-calling-api-in-react-redux-saga%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you are using axios, you could change the timeout setting like this.
axios(
method: 'post',
url: 'http://127.0.0.1:9000',
timeout: 60 * 2 * 1000, // Let's say you want to wait at least 2 mins
data:
id: '1234',
)
i have set axios.defaults.timeout = 1000. it worked. Thanks for your help
– Talha Malik
Mar 9 at 12:32
Great to hear! If all is well please approve the answer! (stackoverflow.com/help/someone-answers)
– Tetsuya3850
Mar 9 at 23:06
add a comment |
If you are using axios, you could change the timeout setting like this.
axios(
method: 'post',
url: 'http://127.0.0.1:9000',
timeout: 60 * 2 * 1000, // Let's say you want to wait at least 2 mins
data:
id: '1234',
)
i have set axios.defaults.timeout = 1000. it worked. Thanks for your help
– Talha Malik
Mar 9 at 12:32
Great to hear! If all is well please approve the answer! (stackoverflow.com/help/someone-answers)
– Tetsuya3850
Mar 9 at 23:06
add a comment |
If you are using axios, you could change the timeout setting like this.
axios(
method: 'post',
url: 'http://127.0.0.1:9000',
timeout: 60 * 2 * 1000, // Let's say you want to wait at least 2 mins
data:
id: '1234',
)
If you are using axios, you could change the timeout setting like this.
axios(
method: 'post',
url: 'http://127.0.0.1:9000',
timeout: 60 * 2 * 1000, // Let's say you want to wait at least 2 mins
data:
id: '1234',
)
answered Mar 9 at 9:39
Tetsuya3850Tetsuya3850
399210
399210
i have set axios.defaults.timeout = 1000. it worked. Thanks for your help
– Talha Malik
Mar 9 at 12:32
Great to hear! If all is well please approve the answer! (stackoverflow.com/help/someone-answers)
– Tetsuya3850
Mar 9 at 23:06
add a comment |
i have set axios.defaults.timeout = 1000. it worked. Thanks for your help
– Talha Malik
Mar 9 at 12:32
Great to hear! If all is well please approve the answer! (stackoverflow.com/help/someone-answers)
– Tetsuya3850
Mar 9 at 23:06
i have set axios.defaults.timeout = 1000. it worked. Thanks for your help
– Talha Malik
Mar 9 at 12:32
i have set axios.defaults.timeout = 1000. it worked. Thanks for your help
– Talha Malik
Mar 9 at 12:32
Great to hear! If all is well please approve the answer! (stackoverflow.com/help/someone-answers)
– Tetsuya3850
Mar 9 at 23:06
Great to hear! If all is well please approve the answer! (stackoverflow.com/help/someone-answers)
– Tetsuya3850
Mar 9 at 23:06
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55075819%2fyield-call-timeout-after-60-seconds-when-calling-api-in-react-redux-saga%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
what are you using to make the api call? something like fetch or axios?
– Tetsuya3850
Mar 9 at 9:36