Skip to content

Commit

Permalink
scribe: increase maximum thrift request size
Browse files Browse the repository at this point in the history
Summary:
The thrift TNonblockingServer now limits the size of incoming requests,
to avoid trying to allocate very large chunks of memory if a client
sends garbage data.

For scribe, just set the limit to the maximum possible value, to avoid
rejecting requests from clients that send huge log requests.  In the
future it may be wise to reduce this limit to avoid DoS from random
clients, but for now we want to avoid breaking any existing clients.

Test Plan:
It builds.  I didn't actually run it.  Let me know if there are some
simple sanity tests I should run.

DiffCamp Revision: 108812
Reviewed By: groys
CC: agiardullo, groys, simpkins, thrift-team@lists
Revert Plan:
OK

git-svn-id: svn+ssh://tubbs/svnapps/fbomb/trunk/fbcode/scribe@26592 2248de34-8caa-4a3c-bc55-5e52d9d7b73a
  • Loading branch information
simpkins authored and groys committed May 17, 2010
1 parent e3cde30 commit 44a23ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/scribe_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ int main(int argc, char **argv) {
server.setOverloadAction(T_OVERLOAD_CLOSE_ON_ACCEPT);
}

// increase the maximum request size that thrift will accept
server.setMaxFrameSize(numeric_limits<size_t>::max());

server.serve();

} catch(const std::exception& e) {
Expand Down

0 comments on commit 44a23ec

Please sign in to comment.