Skip to content

Watchdog unhappy with long requests #139

Answered by mathieucarbou
erwan-privat asked this question in Q&A
Discussion options

You must be logged in to vote

https://github.com/erwan-privat/rbr-magnac/blob/13cef33ea92807c50af5a0d225d38c5b9f0eba83/ServeurWeb.cpp#L63

Do not use stream responses to send back json data and do not yield.
Here, you are just accumulating data in memory which is not streamed but sent at once over the Network when the handler finishes.

Also, do not yield: building a Jason document is a fast operations so if you yield it potentially stop a handler which has to be executed fast to let another task with higher priority execute.

Replies: 10 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by erwan-privat
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@mathieucarbou
Comment options

@mathieucarbou
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mathieucarbou
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants