I am working on a multi website system which uses Cassandra to handle all of its data needs.
When I first install a website, it adds 3918 pages (and growing) with many fields, attachments such as JS files, links between pages, etc.
At some point, my test "cluster" (one node) decides that the data is coming to fast and it times out or worst, Cassandra "crashes" because of an out of memory (OOM). More or less, from what I can see the 2Gb of RAM allocated by Cassandra fills up and then, more often than not, Cassandra does not control its available RAM and gets an OOM. When I don't get the OOM, I get timeouts.
Is there a call in the C/C++ driver to know whether the "cluster" is slow so I can wait for a while instead of pushing more data like crazy?
At this point, the only thing I can see is me doing a write (INSERT INTO ...
) and getting a Timeout error. More precisely, this error: CASS_ERROR_SERVER_WRITE_TIMEOUT
. I find it rather ugly to wait until I get such an error to start pacing my INSERT
s in order to manage the load. Is that the only way?!
Update: I was able to avoid the OOM, but only by reducing the number of plugins that get installed on first website creation (I do not need to have all the plugins installed at once). This is not a good solution, if you ask me, because a Cassandra node should NOT just crash like that. This could (probably does happen to many) happen in production and that's intolerable to think that could happen any time the load goes a tad bit too high for a minute...